diff options
author | YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org> | 2010-03-15 19:26:56 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-16 14:15:46 -0700 |
commit | 8440853bb70010f2f8edc26cb0f7af60da8b2c5a (patch) | |
tree | d0f5098be166558deb5baf3292f770dee2d7e326 /net/bridge | |
parent | 0ba8c9ec25465cd0680b80c0f5836f558e3b972d (diff) | |
download | linux-8440853bb70010f2f8edc26cb0f7af60da8b2c5a.tar.bz2 |
bridge br_multicast: Fix skb leakage in error path.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_multicast.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index 19618f25b4c6..6980625537ca 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c @@ -991,7 +991,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br, err = pskb_trim_rcsum(skb2, len); if (err) - return err; + goto err_out; } len -= ip_hdrlen(skb2); @@ -1013,7 +1013,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br, case CHECKSUM_NONE: skb2->csum = 0; if (skb_checksum_complete(skb2)) - return -EINVAL; + goto out; } err = 0; @@ -1040,6 +1040,7 @@ static int br_multicast_ipv4_rcv(struct net_bridge *br, out: __skb_push(skb2, offset); +err_out: if (skb2 != skb) kfree_skb(skb2); return err; |