From: Changli Gao Date: Sun, 22 Aug 2010 19:03:26 +0000 (+0000) Subject: bridge: netfilter: fix a memory leak X-Git-Tag: MMI-PSA29.97-13-9~22097^2~167 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4c3a76abd379d9a4668b2d417baa991de9757dc2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git bridge: netfilter: fix a memory leak nf_bridge_alloc() always reset the skb->nf_bridge, so we should always put the old one. Signed-off-by: Changli Gao Signed-off-by: Bart De Schuymer Signed-off-by: David S. Miller --- diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c index 2c911c0759c2..5ed00bd7009f 100644 --- a/net/bridge/br_netfilter.c +++ b/net/bridge/br_netfilter.c @@ -162,8 +162,8 @@ static inline struct nf_bridge_info *nf_bridge_unshare(struct sk_buff *skb) if (tmp) { memcpy(tmp, nf_bridge, sizeof(struct nf_bridge_info)); atomic_set(&tmp->use, 1); - nf_bridge_put(nf_bridge); } + nf_bridge_put(nf_bridge); nf_bridge = tmp; } return nf_bridge;