Skip to contentSkip to conversation

skb leakage in inet6_csk_xmit

PATCH Applied Alexey Kuznetsov 2 participants 2 messages May 10, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 skb leakage in inet6_csk_xmit

Hello!

inet6_csk_xit does not free skb when routing fails.

net/ipv6/inet6_connection_sock.c +2 -0
index f8f3a37..eb2865d 100644
@@ -173,6 +173,7 @@ int inet6_csk_xmit(struct sk_buff *skb, 
 
 		if (err) {
 			sk->sk_err_soft = -err;
+			kfree_skb(skb);
 			return err;
 		}
 
@@ -181,6 +182,7 @@ int inet6_csk_xmit(struct sk_buff *skb, 
 
 		if ((err = xfrm_lookup(&dst, &fl, sk, 0)) < 0) {
 			sk->sk_route_caps = 0;
+			kfree_skb(skb);
 			return err;
 		}