8021q: fix a potential memory leak
authorLi RongQing <roy.qing.li@gmail.com>
Wed, 18 Jun 2014 05:46:02 +0000 (13:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Jul 2014 15:00:04 +0000 (08:00 -0700)
commit1b56220b0df8f0963bacbf35637545b550484a64
treef68d624cfe37f12fbfe852da2376e2470fbad091
parente9013d0f0faef78f90f7bb30e722965fe992dc1e
8021q: fix a potential memory leak

[ Upstream commit 916c1689a09bc1ca81f2d7a34876f8d35aadd11b ]

skb_cow called in vlan_reorder_header does not free the skb when it failed,
and vlan_reorder_header returns NULL to reset original skb when it is called
in vlan_untag, lead to a memory leak.

Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/8021q/vlan_core.c