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

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
......@@ -796,8 +796,8 @@ static int alloc_wbufs(struct ubifs_info *c)
{
int i, err;
c->jheads = kzalloc(c->jhead_cnt * sizeof(struct ubifs_jhead),
GFP_KERNEL);
c->jheads = kcalloc(c->jhead_cnt, sizeof(struct ubifs_jhead),
GFP_KERNEL);
if (!c->jheads)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment