Skip to content

Commit

Permalink
fs: Convert kmalloc() + memset() to kzalloc() in fs/.
Browse files Browse the repository at this point in the history
Convert the single available instance of kmalloc() + memset() to
kzalloc() in the fs/ directory.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
  • Loading branch information
Robert P. J. Day authored and Adrian Bunk committed Dec 12, 2006
1 parent df4365c commit b87576d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/binfmt_elf_fdpic.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,11 @@ static int elf_fdpic_map_file(struct elf_fdpic_params *params,
return -ELIBBAD;

size = sizeof(*loadmap) + nloads * sizeof(*seg);
loadmap = kmalloc(size, GFP_KERNEL);
loadmap = kzalloc(size, GFP_KERNEL);
if (!loadmap)
return -ENOMEM;

params->loadmap = loadmap;
memset(loadmap, 0, size);

loadmap->version = ELF32_FDPIC_LOADMAP_VERSION;
loadmap->nsegs = nloads;
Expand Down

0 comments on commit b87576d

Please sign in to comment.