diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-04-01 06:54:09 -0400 |
---|---|---|
committer | Patrick McHardy <kaber@trash.net> | 2010-04-01 06:54:09 -0400 |
commit | 902a3dd5e6b19048604ec533203d7d38a39505a2 (patch) | |
tree | c6cfe2d015e9a7987701f3fc308ba90b8db47874 /net | |
parent | d26e6a02835affa8bafe09a51e37f9fbc339e415 (diff) |
netfilter: CLUSTERIP: clusterip_seq_stop() fix
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>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/netfilter/ipt_CLUSTERIP.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 5d70c43302bb..c6be74e57264 100644 --- 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) | |||
599 | 599 | ||
600 | static void clusterip_seq_stop(struct seq_file *s, void *v) | 600 | static void clusterip_seq_stop(struct seq_file *s, void *v) |
601 | { | 601 | { |
602 | kfree(v); | 602 | if (!IS_ERR(v)) |
603 | kfree(v); | ||
603 | } | 604 | } |
604 | 605 | ||
605 | static int clusterip_seq_show(struct seq_file *s, void *v) | 606 | static int clusterip_seq_show(struct seq_file *s, void *v) |