diff options
author | arr <arr@FreeBSD.org> | 2002-03-19 15:41:21 +0000 |
---|---|---|
committer | arr <arr@FreeBSD.org> | 2002-03-19 15:41:21 +0000 |
commit | ae315cb9192d1b29cb62a29ca30cc1c6d9409b39 (patch) | |
tree | b31047b848e36333a051277ca4f51ff96dc0b283 | |
parent | c4ba564b6d318e2751b6695f15acaf147f752157 (diff) | |
download | FreeBSD-src-ae315cb9192d1b29cb62a29ca30cc1c6d9409b39.zip FreeBSD-src-ae315cb9192d1b29cb62a29ca30cc1c6d9409b39.tar.gz |
- Change a malloc / bzero pair to make use of the M_ZERO malloc(9) flag.
-rw-r--r-- | sys/kern/kern_linker.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index d83e005..192877c 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -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; |