projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca6982b
)
netfilter: xt_quota: fix wrong return value (error case)
author
Patrick McHardy
<
[email protected]
>
Thu, 20 Aug 2009 02:47:34 +0000
(
02:47
+0000)
committer
David S. Miller
<
[email protected]
>
Mon, 24 Aug 2009 02:09:23 +0000
(19:09 -0700)
Success was indicated on a memory allocation failure, thereby causing
a crash due to a later NULL deref.
(Affects v2.6.30-rc1 up to here.)
Signed-off-by: Jan Engelhardt <
[email protected]
>
Signed-off-by: Patrick McHardy <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/netfilter/xt_quota.c
patch
|
blob
|
history
diff --git
a/net/netfilter/xt_quota.c
b/net/netfilter/xt_quota.c
index 98fc190e8f0eed8683e9836b6be1567ecea74382..390b7d09fe512f2957769ace3b8a579b64f64086 100644
(file)
--- a/
net/netfilter/xt_quota.c
+++ b/
net/netfilter/xt_quota.c
@@
-52,7
+52,7
@@
static bool quota_mt_check(const struct xt_mtchk_param *par)
q->master = kmalloc(sizeof(*q->master), GFP_KERNEL);
if (q->master == NULL)
- return
-ENOMEM
;
+ return
false
;
q->master->quota = q->quota;
return true;