mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:10:54 +07:00
netfilter: nf_conntrack_bridge: Fix memory leak when error
[ Upstream commit 38ea9def5b62f9193f6bad96c5d108e2830ecbde ]
It should be added kfree_skb_list() when err is not equal to zero
in nf_br_ip_fragment().
v2: keep this aligned with IPv6.
v3: modify iter.frag_list to iter.frag.
Fixes: 3c171f496e
("netfilter: bridge: add connection tracking system")
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
89097b964b
commit
800b7ad7d2
@ -88,6 +88,12 @@ static int nf_br_ip_fragment(struct net *net, struct sock *sk,
|
||||
|
||||
skb = ip_fraglist_next(&iter);
|
||||
}
|
||||
|
||||
if (!err)
|
||||
return 0;
|
||||
|
||||
kfree_skb_list(iter.frag);
|
||||
|
||||
return err;
|
||||
}
|
||||
slow_path:
|
||||
|
Loading…
Reference in New Issue
Block a user