Skip to content

Commit

Permalink
netfilter: xt_connlimit: use kmalloc() instead of kzalloc()
Browse files Browse the repository at this point in the history
All the members are initialized after kzalloc().

Signed-off-by: Changli Gao <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
  • Loading branch information
xiaosuo authored and kaber committed Mar 15, 2011
1 parent 8183e3a commit 0e23ca1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_connlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0e23ca1

Please sign in to comment.