mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
UBIFS: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Artem Bityutskiy <[email protected]>
This commit is contained in:
parent
ef13f01828
commit
86b4c14de3
1 changed files with 2 additions and 2 deletions
|
|
@ -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 a new issue