[NET]: Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
a0ee7c70b2
commit
0da974f4f3
@@ -1640,10 +1640,9 @@ static int tcp_seq_open(struct inode *inode, struct file *file)
|
||||
if (unlikely(afinfo == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
s = kmalloc(sizeof(*s), GFP_KERNEL);
|
||||
s = kzalloc(sizeof(*s), GFP_KERNEL);
|
||||
if (!s)
|
||||
return -ENOMEM;
|
||||
memset(s, 0, sizeof(*s));
|
||||
s->family = afinfo->family;
|
||||
s->seq_ops.start = tcp_seq_start;
|
||||
s->seq_ops.next = tcp_seq_next;
|
||||
|
Reference in New Issue
Block a user