aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 9bfcddad695b..f136cec96d95 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1468,11 +1468,10 @@ static int udp_seq_open(struct inode *inode, struct file *file)
1468 struct udp_seq_afinfo *afinfo = PDE(inode)->data; 1468 struct udp_seq_afinfo *afinfo = PDE(inode)->data;
1469 struct seq_file *seq; 1469 struct seq_file *seq;
1470 int rc = -ENOMEM; 1470 int rc = -ENOMEM;
1471 struct udp_iter_state *s = kmalloc(sizeof(*s), GFP_KERNEL); 1471 struct udp_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL);
1472 1472
1473 if (!s) 1473 if (!s)
1474 goto out; 1474 goto out;
1475 memset(s, 0, sizeof(*s));
1476 s->family = afinfo->family; 1475 s->family = afinfo->family;
1477 s->seq_ops.start = udp_seq_start; 1476 s->seq_ops.start = udp_seq_start;
1478 s->seq_ops.next = udp_seq_next; 1477 s->seq_ops.next = udp_seq_next;