mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-15 08:44:14 +08:00
UBIFS: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
This commit is contained in:
parent
ef13f01828
commit
86b4c14de3
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user