OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f7b51b
)
netfilter: nf_conntrack_bridge: Fix memory leak when error
author
Yajun Deng
<yajun.deng@linux.dev>
Thu, 29 Jul 2021 08:20:21 +0000
(16:20 +0800)
committer
Pablo Neira Ayuso
<pablo@netfilter.org>
Wed, 4 Aug 2021 08:41:29 +0000
(10:41 +0200)
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:
3c171f496ef5
("netfilter: bridge: add connection tracking system")
Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/bridge/netfilter/nf_conntrack_bridge.c
patch
|
blob
|
history
diff --git
a/net/bridge/netfilter/nf_conntrack_bridge.c
b/net/bridge/netfilter/nf_conntrack_bridge.c
index
8d033a7
..
fdbed31
100644
(file)
--- a/
net/bridge/netfilter/nf_conntrack_bridge.c
+++ b/
net/bridge/netfilter/nf_conntrack_bridge.c
@@
-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: