mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-27 16:39:08 +00:00
- Change a malloc / bzero pair to make use of the M_ZERO malloc(9) flag.
This commit is contained in:
parent
95ca00720d
commit
08a54da785
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=92705
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user