projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d26e6a0
)
netfilter: CLUSTERIP: clusterip_seq_stop() fix
author
Eric Dumazet
<eric.dumazet@gmail.com>
Thu, 1 Apr 2010 10:54:09 +0000
(12:54 +0200)
committer
Patrick McHardy
<kaber@trash.net>
Thu, 1 Apr 2010 10:54:09 +0000
(12:54 +0200)
If clusterip_seq_start() memory allocation fails, we crash later in
clusterip_seq_start(), trying to kfree(ERR_PTR(-ENOMEM))
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/ipv4/netfilter/ipt_CLUSTERIP.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/netfilter/ipt_CLUSTERIP.c
b/net/ipv4/netfilter/ipt_CLUSTERIP.c
index 5d70c43302bbf58f07f2933ed7221b7423d62898..c6be74e572642b5345a5844c9163141e6e51a4df 100644
(file)
--- a/
net/ipv4/netfilter/ipt_CLUSTERIP.c
+++ b/
net/ipv4/netfilter/ipt_CLUSTERIP.c
@@
-599,7
+599,8
@@
static void *clusterip_seq_next(struct seq_file *s, void *v, loff_t *pos)
static void clusterip_seq_stop(struct seq_file *s, void *v)
{
- kfree(v);
+ if (!IS_ERR(v))
+ kfree(v);
}
static int clusterip_seq_show(struct seq_file *s, void *v)