Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b16214d4 authored by Fabian Frederick's avatar Fabian Frederick Committed by Linus Torvalds
Browse files

fs/adfs/dir_fplus.c: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e2ffcf5c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ adfs_fplus_read(struct super_block *sb, unsigned int id, unsigned int sz, struct
	if (size > ARRAY_SIZE(dir->bh)) {
		/* this directory is too big for fixed bh set, must allocate */
		struct buffer_head **bh_fplus =
			kzalloc(size * sizeof(struct buffer_head *),
			kcalloc(size, sizeof(struct buffer_head *),
				GFP_KERNEL);
		if (!bh_fplus) {
			adfs_error(sb, "not enough memory for"