summaryrefslogtreecommitdiffstats
path: root/fs/omfs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-08-08 23:22:41 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-09 00:57:25 +0200
commit998d6688fb399ab313dcd6f24d1196e3aaa8578c (patch)
tree016914a7d54599a5afc725eb464ceeed1668b5b1 /fs/omfs
parentfs/pstore/ram_core.c: replace count*size kmalloc by kmalloc_array (diff)
downloadlinux-998d6688fb399ab313dcd6f24d1196e3aaa8578c.tar.xz
linux-998d6688fb399ab313dcd6f24d1196e3aaa8578c.zip
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>
Diffstat (limited to 'fs/omfs')
-rw-r--r--fs/omfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index ec58c7659183..ba8819702c56 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -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;