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

Commit f2b3455e authored by Fabian Frederick's avatar Fabian Frederick Committed by Miklos Szeredi
Browse files

fuse: replace count*size kzalloc by kcalloc



kcalloc manages count*sizeof overflow.

Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 27f1b363
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1992,8 +1992,8 @@ static int fuse_writepages(struct address_space *mapping,
	data.ff = NULL;

	err = -ENOMEM;
	data.orig_pages = kzalloc(sizeof(struct page *) *
				  FUSE_MAX_PAGES_PER_REQ,
	data.orig_pages = kcalloc(FUSE_MAX_PAGES_PER_REQ,
				  sizeof(struct page *),
				  GFP_NOFS);
	if (!data.orig_pages)
		goto out;