mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 03:50:53 +07: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