Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f0d1a00 authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by David S. Miller
Browse files

[NETFILTER] nf_conntrack_expect.c: kmalloc + memset conversion to kzalloc

parent 2f081235
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -477,15 +477,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);