Messages in this thread Patch in this message | | | From | Fabian Frederick <> | Subject | [PATCH 1/1] fs/omfs/inode.c: replace count*size kzalloc by kcalloc | Date | Wed, 25 Jun 2014 20:17:17 +0200 |
| |
kcalloc manages count*sizeof overflow.
Cc: Bob Copeland <me@bobcopeland.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> --- fs/omfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c index ec58c76..ba88197 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; -- 1.9.1
| |