nfnetlink_log: fix reference leak
[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: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
23dfe33bc7
commit
752d2d1742
@@ -720,15 +720,16 @@ nfulnl_log_packet(unsigned int pf,
|
||||
inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100);
|
||||
add_timer(&inst->timer);
|
||||
}
|
||||
spin_unlock_bh(&inst->lock);
|
||||
|
||||
unlock_and_release:
|
||||
spin_unlock_bh(&inst->lock);
|
||||
instance_put(inst);
|
||||
return;
|
||||
|
||||
alloc_failure:
|
||||
spin_unlock_bh(&inst->lock);
|
||||
instance_put(inst);
|
||||
UDEBUG("error allocating skb\n");
|
||||
/* FIXME: statistics */
|
||||
goto unlock_and_release;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user