diff options
author | Michal Ruzicka <michal.ruzicka@comstar.cz> | 2006-08-15 03:20:17 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-08-17 19:29:49 -0400 |
commit | bb699cbca0096aa3f5f750264ec0af080732375a (patch) | |
tree | 4340b45f9750f7855abe937ff9c5c1427166e48a | |
parent | 640c41c77a96dbbfb74d40ae86ab75b759afb911 (diff) |
[IPV4]: Possible leak of multicast source filter sctructure
There is a leak of a socket's multicast source filter list structure
on closing a socket with a multicast source filter set on an interface
that does not exist any more.
Signed-off-by: Michal Ruzicka <michal.ruzicka@comstar.cz>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/igmp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 9f4b752f5a33..e981369ebe13 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -2199,13 +2199,13 @@ void ip_mc_drop_socket(struct sock *sk) | |||
2199 | struct in_device *in_dev; | 2199 | struct in_device *in_dev; |
2200 | inet->mc_list = iml->next; | 2200 | inet->mc_list = iml->next; |
2201 | 2201 | ||
2202 | if ((in_dev = inetdev_by_index(iml->multi.imr_ifindex)) != NULL) { | 2202 | in_dev = inetdev_by_index(iml->multi.imr_ifindex); |
2203 | (void) ip_mc_leave_src(sk, iml, in_dev); | 2203 | (void) ip_mc_leave_src(sk, iml, in_dev); |
2204 | if (in_dev != NULL) { | ||
2204 | ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr); | 2205 | ip_mc_dec_group(in_dev, iml->multi.imr_multiaddr.s_addr); |
2205 | in_dev_put(in_dev); | 2206 | in_dev_put(in_dev); |
2206 | } | 2207 | } |
2207 | sock_kfree_s(sk, iml, sizeof(*iml)); | 2208 | sock_kfree_s(sk, iml, sizeof(*iml)); |
2208 | |||
2209 | } | 2209 | } |
2210 | rtnl_unlock(); | 2210 | rtnl_unlock(); |
2211 | } | 2211 | } |