mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 01:30:55 +07:00
fs/omfs/inode.c: replace count*size kzalloc by kcalloc
kcalloc manages count*sizeof overflow. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Bob Copeland <me@bobcopeland.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
b8f52d89c0
commit
998d6688fb
@ -321,7 +321,7 @@ static int omfs_get_imap(struct super_block *sb)
|
||||
goto out;
|
||||
|
||||
sbi->s_imap_size = array_size;
|
||||
sbi->s_imap = kzalloc(array_size * sizeof(unsigned long *), GFP_KERNEL);
|
||||
sbi->s_imap = kcalloc(array_size, sizeof(unsigned long *), GFP_KERNEL);
|
||||
if (!sbi->s_imap)
|
||||
goto nomem;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user