From mboxrd@z Thu Jan 1 00:00:00 1970 From: Changli Gao Subject: [PATCH 2/4] netfilter: xt_connlimit: use kmalloc() instead of kzalloc() Date: Mon, 14 Mar 2011 14:50:12 +0800 Message-ID: <1300085414-27275-2-git-send-email-xiaosuo@gmail.com> References: <1300085414-27275-1-git-send-email-xiaosuo@gmail.com> Cc: "David S. Miller" , netfilter-devel@vger.kernel.org, netdev@vger.kernel.org, Changli Gao To: Patrick McHardy Return-path: Received: from mail-iy0-f174.google.com ([209.85.210.174]:34935 "EHLO mail-iy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753966Ab1CNGv3 (ORCPT ); Mon, 14 Mar 2011 02:51:29 -0400 In-Reply-To: <1300085414-27275-1-git-send-email-xiaosuo@gmail.com> Sender: netfilter-devel-owner@vger.kernel.org List-ID: All the members are initialized after kzalloc(). Signed-off-by: Changli Gao --- net/netfilter/xt_connlimit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c index 1f4b9f9..ade2a80 100644 --- a/net/netfilter/xt_connlimit.c +++ b/net/netfilter/xt_connlimit.c @@ -162,7 +162,7 @@ static int count_them(struct net *net, if (addit) { /* save the new connection in our list */ - conn = kzalloc(sizeof(*conn), GFP_ATOMIC); + conn = kmalloc(sizeof(*conn), GFP_ATOMIC); if (conn == NULL) return -ENOMEM; conn->tuple = *tuple;