mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-02 08:34:20 +08:00
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 <xiaosuo@gmail.com> Signed-off-by: Bart De Schuymer <bdschuym@pandora.be> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
cca77b7c81
commit
4c3a76abd3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user