diff options
author | Michal Miroslaw <mirq-linux@rere.qmqm.pl> | 2007-03-04 18:58:15 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-03-05 16:25:21 -0500 |
commit | ed32abeaf3a3da79b63af6a75f0bd0aa7e7eed9e (patch) | |
tree | 9fe8dab9db6b1dc2ddebd508cddade025de25138 /net | |
parent | d3ab4298aa136d07219664d563d8decf0e75693f (diff) |
[NETFILTER]: nfnetlink_log: fix reference leak
Stop reference leaking in nfulnl_log_packet(). If we start a timer we
are already taking another reference.
Signed-off-by: Michal Miroslaw <mirq-linux@rere.qmqm.pl>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/netfilter/nfnetlink_log.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index b8eab0dbc3dd..62c3f31cdb97 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -711,15 +711,16 @@ nfulnl_log_packet(unsigned int pf, | |||
711 | inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100); | 711 | inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100); |
712 | add_timer(&inst->timer); | 712 | add_timer(&inst->timer); |
713 | } | 713 | } |
714 | spin_unlock_bh(&inst->lock); | ||
715 | 714 | ||
715 | unlock_and_release: | ||
716 | spin_unlock_bh(&inst->lock); | ||
717 | instance_put(inst); | ||
716 | return; | 718 | return; |
717 | 719 | ||
718 | alloc_failure: | 720 | alloc_failure: |
719 | spin_unlock_bh(&inst->lock); | ||
720 | instance_put(inst); | ||
721 | UDEBUG("error allocating skb\n"); | 721 | UDEBUG("error allocating skb\n"); |
722 | /* FIXME: statistics */ | 722 | /* FIXME: statistics */ |
723 | goto unlock_and_release; | ||
723 | } | 724 | } |
724 | 725 | ||
725 | static int | 726 | static int |