From: Patrick McHardy Date: Mon, 5 Dec 2005 21:38:16 +0000 (-0800) Subject: [NETFILTER]: Don't use conntrack entry after dropping the reference X-Git-Tag: v2.6.15-rc6~145^2~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2fdf1faa8e33082d691bcba18814276f2bd5a6f0;p=linux-2.6 [NETFILTER]: Don't use conntrack entry after dropping the reference Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c index d058ac41bf..91fe8f2e38 100644 --- a/net/ipv4/netfilter/ip_conntrack_netlink.c +++ b/net/ipv4/netfilter/ip_conntrack_netlink.c @@ -728,11 +728,9 @@ ctnetlink_del_conntrack(struct sock *ctnl, struct sk_buff *skb, return -ENOENT; } } - if (del_timer(&ct->timeout)) { - ip_conntrack_put(ct); + if (del_timer(&ct->timeout)) ct->timeout.function((unsigned long)ct); - return 0; - } + ip_conntrack_put(ct); DEBUGP("leaving\n");