summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_kobj.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_kobj.c')
-rw-r--r--sys/kern/subr_kobj.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c
index 2f3e60f..659e97a 100644
--- a/sys/kern/subr_kobj.c
+++ b/sys/kern/subr_kobj.c
@@ -175,10 +175,9 @@ kobj_create(kobj_class_t cls,
/*
* Allocate and initialise the new object.
*/
- obj = malloc(cls->size, mtype, mflags);
+ obj = malloc(cls->size, mtype, mflags | M_ZERO);
if (!obj)
return 0;
- bzero(obj, cls->size);
kobj_init(obj, cls);
return obj;
OpenPOWER on IntegriCloud