Skip to content

Commit

Permalink
netfilter: nfnetlink_log: fix silly refcount leak
Browse files Browse the repository at this point in the history
Quick fix for memory/module refcount leak.
Reference count of listener instance never reaches 0.

Start/stop of ulogd2 is enough to trigger this bug!

Now, refcounting there looks very fishy in particular this code:

 	if (!try_module_get(THIS_MODULE)) {
		...

and creation of listener instance with refcount 2,
so it may very well be ripped and redone.  :-)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Alexey Dobriyan authored and Patrick McHardy committed Feb 26, 2010
1 parent 51f0bc7 commit a49c650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nfnetlink_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
}

instance_destroy(inst);
goto out;
goto out_put;
default:
ret = -ENOTSUPP;
break;
Expand Down

0 comments on commit a49c650

Please sign in to comment.