aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-02 00:52:34 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-02 22:42:23 -0400
commit9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627 (patch)
tree4f28c6d8672ebc3b7e95fadeb31b84e23d987f50 /net
parent2f0812350e0e34f583919470b0517c2e368ee048 (diff)
[NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/netfilter/nf_conntrack_expect.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c
index eb6695dcd73b..3ac64e25f10c 100644
--- a/net/netfilter/nf_conntrack_expect.c
+++ b/net/netfilter/nf_conntrack_expect.c
@@ -477,15 +477,14 @@ static int exp_open(struct inode *inode, struct file *file)
477 struct ct_expect_iter_state *st; 477 struct ct_expect_iter_state *st;
478 int ret; 478 int ret;
479 479
480 st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL); 480 st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
481 if (st == NULL) 481 if (!st)
482 return -ENOMEM; 482 return -ENOMEM;
483 ret = seq_open(file, &exp_seq_ops); 483 ret = seq_open(file, &exp_seq_ops);
484 if (ret) 484 if (ret)
485 goto out_free; 485 goto out_free;
486 seq = file->private_data; 486 seq = file->private_data;
487 seq->private = st; 487 seq->private = st;
488 memset(st, 0, sizeof(struct ct_expect_iter_state));
489 return ret; 488 return ret;
490out_free: 489out_free:
491 kfree(st); 490 kfree(st);