summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-08-01 21:53:24 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-02 19:42:24 -0700
commit8adc5465525f28be1f728b6fa600d327e1d49f55 (patch)
treee5ffd70d74f30957c18cfa8e1d9e5d8c37ea157a /net
parent9f0d1a004d8d8c33d337d2b1cc9f0dc941cab627 (diff)
downloadop-kernel-dev-8adc5465525f28be1f728b6fa600d327e1d49f55.zip
op-kernel-dev-8adc5465525f28be1f728b6fa600d327e1d49f55.tar.gz
[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>
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c5
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 27c7918..b3dd5de 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)
struct ct_expect_iter_state *st;
int ret;
- st = kmalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
- if (st == NULL)
+ st = kzalloc(sizeof(struct ct_expect_iter_state), GFP_KERNEL);
+ if (!st)
return -ENOMEM;
ret = seq_open(file, &exp_seq_ops);
if (ret)
goto out_free;
seq = file->private_data;
seq->private = st;
- memset(st, 0, sizeof(struct ct_expect_iter_state));
return ret;
out_free:
kfree(st);
OpenPOWER on IntegriCloud