diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-08-02 00:53:24 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-02 22:42:24 -0400 |
commit | 8adc5465525f28be1f728b6fa600d327e1d49f55 (patch) | |
tree | e5ffd70d74f30957c18cfa8e1d9e5d8c37ea157a | |
parent | 9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627 (diff) |
[NETFILTER] nf_conntrack_l3proto_ipv4_compat.c: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c index 27c7918e442a..b3dd5de9a258 100644 --- a/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c +++ b/net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c | |||
@@ -294,15 +294,14 @@ static int exp_open(struct inode *inode, struct file *file) | |||
294 | struct ct_expect_iter_state *st; | 294 | struct ct_expect_iter_state *st; |
295 | int ret; | 295 | int ret; |
296 | 296 | ||
297 | st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL); | 297 | st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL); |
298 | if (st == NULL) | 298 | if (!st) |
299 | return -ENOMEM; | 299 | return -ENOMEM; |
300 | ret = seq_open(file, &exp_seq_ops); | 300 | ret = seq_open(file, &exp_seq_ops); |
301 | if (ret) | 301 | if (ret) |
302 | goto out_free; | 302 | goto out_free; |
303 | seq = file->private_data; | 303 | seq = file->private_data; |
304 | seq->private = st; | 304 | seq->private = st; |
305 | memset(st, 0, sizeof(struct ct_expect_iter_state)); | ||
306 | return ret; | 305 | return ret; |
307 | out_free: | 306 | out_free: |
308 | kfree(st); | 307 | kfree(st); |