summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2010-07-29 01:12:31 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-26 16:43:42 -0700
commit047e9f3e4e6bb1362b788d7d7d99e72a15357955 (patch)
tree5b966e2a6282fcad4485b531d0b98ea31d4126cd
parent77c043b1e3a8bbb264fca4018fc518e179324fef (diff)
bridge: Fix skb leak when multicast parsing fails on TX
[ Upstream commit 6d1d1d398cb7db7a12c5d652d50f85355345234f ] On the bridge TX path we're leaking an skb when br_multicast_rcv returns an error. Reported-by: David Lamparter <equinox@diac24.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--net/bridge/br_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index 5752057a924a..5c8ee839bd08 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -37,8 +37,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
rcu_read_lock();
if (dest[0] & 1) {
- if (br_multicast_rcv(br, NULL, skb))
+ if (br_multicast_rcv(br, NULL, skb)) {
+ kfree_skb(skb);
goto out;
+ }
mdst = br_mdb_get(br, skb);
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))