Skip to content

Commit

Permalink
[IPV6]: skb leakage in inet6_csk_xmit
Browse files Browse the repository at this point in the history
inet6_csk_xit does not free skb when routing fails.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Kuznetsov authored and David S. Miller committed May 10, 2006
1 parent ac05202 commit b0013fd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/ipv6/inet6_connection_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)

if (err) {
sk->sk_err_soft = -err;
kfree_skb(skb);
return err;
}

Expand All @@ -181,6 +182,7 @@ int inet6_csk_xmit(struct sk_buff *skb, int ipfragok)

if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
sk->sk_route_caps = 0;
kfree_skb(skb);
return err;
}

Expand Down

0 comments on commit b0013fd

Please sign in to comment.