]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>
Thu, 2 Aug 2007 04:52:34 +0000 (21:52 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 3 Aug 2007 02:42:23 +0000 (19:42 -0700)
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netfilter/nf_conntrack_expect.c

index eb6695dcd73b6b5f51ff843b14eb55a379cc1de8..3ac64e25f10cd45f5629eada35b02a217933159e 100644 (file)
@@ -477,15 +477,14 @@ static int exp_open(struct inode *inode, struct file *file)
        struct ct_expect_iter_state *st;
        int ret;
 
-       st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
-       if (st == NULL)
+       st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+       if (!st)
                return -ENOMEM;
        ret = seq_open(file, &exp_seq_ops);
        if (ret)
                goto out_free;
        seq          = file->private_data;
        seq->private = st;
-       memset(st, 0, sizeof(struct ct_expect_iter_state));
        return ret;
 out_free:
        kfree(st);