summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>2010-03-15 19:26:56 +0000
committerDavid S. Miller <davem@davemloft.net>2010-03-16 14:15:46 -0700
commit8440853bb70010f2f8edc26cb0f7af60da8b2c5a (patch)
treed0f5098be166558deb5baf3292f770dee2d7e326
parent0ba8c9ec25465cd0680b80c0f5836f558e3b972d (diff)
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>
-rw-r--r--net/bridge/br_multicast.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 19618f25b4c..6980625537c 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;