- Change a malloc / bzero pair to make use of the M_ZERO malloc(9) flag.

This commit is contained in:
Andrew R. Reiter 2002-03-19 15:41:21 +00:00
parent 95ca00720d
commit 08a54da785

View File

@ -1018,10 +1018,9 @@ modlist_newmodule(const char *modname, int version, linker_file_t container)
{
modlist_t mod;
mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT);
mod = malloc(sizeof(struct modlist), M_LINKER, M_NOWAIT | M_ZERO);
if (mod == NULL)
panic("no memory for module list");
bzero(mod, sizeof(*mod));
mod->container = container;
mod->name = modname;
mod->version = version;