Subject: [PATCH]: Fix skb leak in igmpv3_newpack

From: Patrick McHardy <[email-masked]>
Date: Fri, 28 May 2004 12:54:26 +0200

This patch fixes an skb-leak in igmpv3_newpack. skb isn't
freed when rt->rt_src == 0. Patch applies to 2.4 and 2.6.

Regards
Patrick
# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/05/28 12:30:41+02:00 [email-masked] 
#   [IPV4]: Fix skb leak in igmpv3_newpack
# 
# net/ipv4/igmp.c
#   2004/05/28 12:30:34+02:00 [email-masked] +1 -0
#   [IPV4]: Fix skb leak in igmpv3_newpack
# 
diff -Nru a/net/ipv4/igmp.c b/net/ipv4/igmp.c
--- a/net/ipv4/igmp.c	2004-05-28 12:35:28 +02:00
+++ b/net/ipv4/igmp.c	2004-05-28 12:35:28 +02:00
@@ -292,6 +292,7 @@
 		}
 	}
 	if (rt->rt_src == 0) {
+		kfree_skb(skb);
 		ip_rt_put(rt);
 		return 0;
 	}