forked from luck/tmp_suning_uos_patched
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