parent 5a3d73bfa8dec93a6d4186be20baa8d4717162b5 (v2.6.31-rc1-57-g5a3d73b) commit 882c1f06d35bff3e02783ef4e20d8a7308e11b95 Author: Jan Engelhardt <jengelh@xxxxxxxxxx> Date: Wed Jul 22 04:42:09 2009 +0200 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@xxxxxxxxxx> --- net/netfilter/xt_quota.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/netfilter/xt_quota.c b/net/netfilter/xt_quota.c index ad0ed79..0de9fcf 100644 --- 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; -- # Created with git-export-patch -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html