mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
netfilter: xt_quota: fix wrong return value (error case)
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 <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ca6982b858
commit
2149f66f49
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue