mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: Convert kmalloc() + memset() to kzalloc() in fs/.
@ 2006-12-03 16:49 Robert P. J. Day
  0 siblings, 0 replies; only message in thread
From: Robert P. J. Day @ 2006-12-03 16:49 UTC (permalink / raw)
  To: Linux kernel mailing list


  Convert the single available instance of kmalloc() + memset() to
kzalloc() in the fs/ directory.

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>

---

  (Re-submission of earlier patch, but omitting erroneous part of
that patch.  Sorry about that.  Nothing but decaf in the house.)

diff --git a/fs/binfmt_elf_fdpic.c b/fs/binfmt_elf_fdpic.c
index f86d5c9..789c1c6 100644
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -709,12 +709,11 @@ #endif
 		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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-03 16:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-03 16:49 [PATCH] fs: Convert kmalloc() + memset() to kzalloc() in fs/ Robert P. J. Day

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®