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

This commit is contained in:
arr 2002-03-19 15:41:21 +00:00
parent c4ba564b6d
commit ae315cb919

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;