]> git.baikalelectronics.ru Git - kernel.git/commit
tap: free skb if flags error
authorWei Xu <wexu@redhat.com>
Fri, 1 Dec 2017 10:10:38 +0000 (05:10 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sun, 3 Dec 2017 02:31:03 +0000 (21:31 -0500)
commit31f4df75cb79aeecc34965fcab79dc6f82306892
treedc7a2620476bf2716201f858f342f3b389cdfae2
parenteef5f2df380ca1d694d956fb0aa9fa4941caf799
tap: free skb if flags error

tap_recvmsg() supports accepting skb by msg_control after
commit 559c97f08b94 ("tap: support receiving skb from msg_control"),
the skb if presented should be freed within the function, otherwise
it would be leaked.

Signed-off-by: Wei Xu <wexu@redhat.com>
Reported-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tap.c