aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
index 3da9d73d1b52..27c7918e442a 100644
--- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
+++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c
@@ -177,7 +177,7 @@ static int ct_open(struct inode *inode, struct file *file)
177 struct ct_iter_state *st; 177 struct ct_iter_state *st;
178 int ret; 178 int ret;
179 179
180 st = kmalloc(sizeof(struct ct_iter_state), GFP_KERNEL); 180 st = kzalloc(sizeof(struct ct_iter_state), GFP_KERNEL);
181 if (st == NULL) 181 if (st == NULL)
182 return -ENOMEM; 182 return -ENOMEM;
183 ret = seq_open(file, &ct_seq_ops); 183 ret = seq_open(file, &ct_seq_ops);
@@ -185,7 +185,6 @@ static int ct_open(struct inode *inode, struct file *file)
185 goto out_free; 185 goto out_free;
186 seq = file->private_data; 186 seq = file->private_data;
187 seq->private = st; 187 seq->private = st;
188 memset(st, 0, sizeof(struct ct_iter_state));
189 return ret; 188 return ret;
190out_free: 189out_free:
191 kfree(st); 190 kfree(st);