aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2010-02-26 11:48:40 -0500
committerPatrick McHardy <kaber@trash.net>2010-02-26 11:48:40 -0500
commita49c65037146bfb2fe300b8277b10b4479fea5fc (patch)
tree3007e26205ca186f3122948efbb402d316253966
parent51f0bc78680edccb6574ef56bd32f9e2939c8a5a (diff)
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>
-rw-r--r--net/netfilter/nfnetlink_log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index 285e9029a9ff..d9b8fb8ab340 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -768,7 +768,7 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb,
768 } 768 }
769 769
770 instance_destroy(inst); 770 instance_destroy(inst);
771 goto out; 771 goto out_put;
772 default: 772 default:
773 ret = -ENOTSUPP; 773 ret = -ENOTSUPP;
774 break; 774 break;