netfilter: nfnetlink_log: fix silly refcount leak

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>
This commit is contained in:
Alexey Dobriyan 2010-02-26 17:48:40 +01:00 коммит произвёл Patrick McHardy
Родитель 51f0bc7868
Коммит a49c650371
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -768,7 +768,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
} }
instance_destroy(inst); instance_destroy(inst);
goto out; goto out_put;
default: default:
ret = -ENOTSUPP; ret = -ENOTSUPP;
break; break;