depmod: clear allocated memory to avoid random segfault

this patch is from Mark Hatle <mark.hatle@windriver.com>, who  ran into
a random segfault using the module-init-tools 3.12 and finally
trace back to depmod.c:grab_module, which appears that the new malloc(...)
setups up things, but never clears the memory that was just allocated.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Yu Ke <ke.yu@intel.com>

diff --git a/depmod.c b/depmod.c
index a1d2f8c..b450808 100644
--- a/depmod.c
+++ b/depmod.c
@@ -430,6 +430,7 @@ static struct module *grab_module(const char *dirname, const char *filename)
 
 	new = NOFAIL(malloc(sizeof(*new)
 			    + strlen(dirname?:"") + 1 + strlen(filename) + 1));
+	memset(new, 0x00, sizeof(*new) + strlen(dirname?:"") + 1 + strlen(filename) + 1);
 	if (dirname)
 		sprintf(new->pathname, "%s/%s", dirname, filename);
 	else
