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

Commit 86b4c14d authored by Fabian Frederick's avatar Fabian Frederick Committed by Artem Bityutskiy
Browse files

UBIFS: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
parent ef13f018
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -796,7 +796,7 @@ static int alloc_wbufs(struct ubifs_info *c)
{
	int i, err;

	c->jheads = kzalloc(c->jhead_cnt * sizeof(struct ubifs_jhead),
	c->jheads = kcalloc(c->jhead_cnt, sizeof(struct ubifs_jhead),
			    GFP_KERNEL);
	if (!c->jheads)
		return -ENOMEM;