From 7a4bc281958c639cd52ff4f192933aa161ba81a4 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 19 Aug 2022 18:03:59 +0200 Subject: kernel: kzalloc --- src/kernel/handle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/kernel/handle.c') diff --git a/src/kernel/handle.c b/src/kernel/handle.c index 3e31a12..d95962c 100644 --- a/src/kernel/handle.c +++ b/src/kernel/handle.c @@ -7,8 +7,7 @@ #include struct handle *handle_init(enum handle_type type) { - struct handle *h = kmalloc(sizeof *h); - memset(h, 0, sizeof *h); + struct handle *h = kzalloc(sizeof *h); h->type = type; h->refcount = 1; return h; -- cgit v1.2.3