mirror of
https://github.com/torvalds/linux.git
synced 2024-11-01 17:51:43 +00:00
[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>
This commit is contained in:
parent
d3ab4298aa
commit
ed32abeaf3
@ -711,15 +711,16 @@ nfulnl_log_packet(unsigned int pf,
|
|||||||
inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100);
|
inst->timer.expires = jiffies + (inst->flushtimeout*HZ/100);
|
||||||
add_timer(&inst->timer);
|
add_timer(&inst->timer);
|
||||||
}
|
}
|
||||||
spin_unlock_bh(&inst->lock);
|
|
||||||
|
|
||||||
|
unlock_and_release:
|
||||||
|
spin_unlock_bh(&inst->lock);
|
||||||
|
instance_put(inst);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
alloc_failure:
|
alloc_failure:
|
||||||
spin_unlock_bh(&inst->lock);
|
|
||||||
instance_put(inst);
|
|
||||||
UDEBUG("error allocating skb\n");
|
UDEBUG("error allocating skb\n");
|
||||||
/* FIXME: statistics */
|
/* FIXME: statistics */
|
||||||
|
goto unlock_and_release;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user