projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef16915
)
netfilter: xt_hashlimit: dl_seq_stop() fix
author
Eric Dumazet
<eric.dumazet@gmail.com>
Thu, 25 Mar 2010 10:00:22 +0000
(11:00 +0100)
committer
Patrick McHardy
<kaber@trash.net>
Thu, 25 Mar 2010 10:00:22 +0000
(11:00 +0100)
If dl_seq_start() memory allocation fails, we crash later in
dl_seq_stop(), trying to kfree(ERR_PTR(-ENOMEM))
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/xt_hashlimit.c
patch
|
blob
|
blame
|
history
diff --git
a/net/netfilter/xt_hashlimit.c
b/net/netfilter/xt_hashlimit.c
index 9e9c48963942ad39b722be5790c8a4b01750b1d4..70d561a2d9e0d0ef98da7d1699ff7609d6b672bd 100644
(file)
--- a/
net/netfilter/xt_hashlimit.c
+++ b/
net/netfilter/xt_hashlimit.c
@@
-879,7
+879,8
@@
static void dl_seq_stop(struct seq_file *s, void *v)
struct xt_hashlimit_htable *htable = s->private;
unsigned int *bucket = (unsigned int *)v;
- kfree(bucket);
+ if (!IS_ERR(bucket))
+ kfree(bucket);
spin_unlock_bh(&htable->lock);
}