Commit 67928c40 authored by Ben Greear's avatar Ben Greear Committed by David S. Miller

ipv6-multicast: Fix memory leak in IPv6 multicast.

If reg_vif_xmit cannot find a routing entry, be sure to
free the skb before returning the error.
Signed-off-by: default avatarBen Greear <greearb@candelatech.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fbe58186
...@@ -696,8 +696,10 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb, ...@@ -696,8 +696,10 @@ static netdev_tx_t reg_vif_xmit(struct sk_buff *skb,
int err; int err;
err = ip6mr_fib_lookup(net, &fl6, &mrt); err = ip6mr_fib_lookup(net, &fl6, &mrt);
if (err < 0) if (err < 0) {
kfree_skb(skb);
return err; return err;
}
read_lock(&mrt_lock); read_lock(&mrt_lock);
dev->stats.tx_bytes += skb->len; dev->stats.tx_bytes += skb->len;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment