netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail.com>
To: Patrick McHardy <kaber@trash.net>
Cc: "David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org,
	Changli Gao <xiaosuo@gmail.com>
Subject: [PATCH 2/4] netfilter: xt_connlimit: use kmalloc() instead of kzalloc()
Date: Mon, 14 Mar 2011 14:50:12 +0800	[thread overview]
Message-ID: <1300085414-27275-2-git-send-email-xiaosuo@gmail.com> (raw)
In-Reply-To: <1300085414-27275-1-git-send-email-xiaosuo@gmail.com>

All the members are initialized after kzalloc().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 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;

  reply	other threads:[~2011-03-14  6:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-14  6:50 [PATCH 1/4] netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario Changli Gao
2011-03-14  6:50 ` Changli Gao [this message]
2011-03-15 12:25   ` [PATCH 2/4] netfilter: xt_connlimit: use kmalloc() instead of kzalloc() Patrick McHardy
2011-03-14  6:50 ` [PATCH 3/4] netfilter: xt_connlimit: use hlist instead Changli Gao
2011-03-15 12:26   ` Patrick McHardy
2011-03-14  6:50 ` [PATCH 4/4] netfilter: xt_connlimit: remove connlimit_rnd_inited Changli Gao
2011-03-15 12:26   ` Patrick McHardy
2011-03-14 12:26 ` [PATCH 1/4] netfilter: xt_connlimit: fix daddr connlimit in SNAT scenario Jan Engelhardt
2011-03-14 12:42   ` Changli Gao
2011-03-14 18:32     ` Patrick McHardy
2011-03-14 19:00     ` Jan Engelhardt
2011-03-14 23:49       ` Changli Gao
2011-03-15  1:16         ` Jan Engelhardt
2011-03-15  1:30           ` Changli Gao
2011-03-15  2:05             ` Jan Engelhardt
2011-03-15 12:21               ` Patrick McHardy
2011-03-15 12:24 ` Patrick McHardy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300085414-27275-2-git-send-email-xiaosuo@gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=davem@davemloft.net \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).