some kmalloc/memset ->kzalloc (tree wide)
[deliverable/linux.git] / net / ipv4 / netfilter / nf_conntrack_l3proto_ipv4_compat.c
index 3da9d73d1b52be43171b57c502e80a33e33d97ba..27c7918e442a78f481df21fa0f4b0f0bf3c4a0df 100644 (file)
@@ -177,7 +177,7 @@ static int ct_open(struct inode *inode, struct file *file)
        struct ct_iter_state *st;
        int ret;
 
-       st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
+       st = kzalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
        if (st == NULL)
                return -ENOMEM;
        ret = seq_open(file, &ct_seq_ops);
@@ -185,7 +185,6 @@ static int ct_open(struct inode *inode, struct file *file)
                goto out_free;
        seq          = file->private_data;
        seq->private = st;
-       memset(st, 0, sizeof(struct ct_iter_state));
        return ret;
 out_free:
        kfree(st);
This page took 0.05874 seconds and 5 git commands to generate.