Re: Possible leak of multicast source filter sctructure

David Stevens
2006-08-10T18:08:20Z

Michal,
This looks correct, but I think a better way to do it is:

in_dev = inetdev_by_index(...)
(void) ip_mc_leave_src()
if (in_dev) {
ip_mc_dec_group()
in_dev_put()
}

That way, sflist internal details aren't visible at this
level, and ip_mc_leave_src() collapses to the sock_kfree_s()
when in_dev is NULL.
Also, ip_mc_leave_group() has the same issue; looks
like it just needs the "if (in_dev)" removed before the call to
ip_mc_leave_src().

+-DLS