summaryrefslogtreecommitdiff
path: root/src/kernel/handle.c
diff options
context:
space:
mode:
authordzwdz2022-08-19 18:03:59 +0200
committerdzwdz2022-08-19 18:03:59 +0200
commit7a4bc281958c639cd52ff4f192933aa161ba81a4 (patch)
tree6afc254b32bc724d872227f4fb3699ef03f511a0 /src/kernel/handle.c
parente9161cdcda9e5170f3ea5f18a8275395004ffce4 (diff)
kernel: kzalloc
Diffstat (limited to 'src/kernel/handle.c')
-rw-r--r--src/kernel/handle.c3
1 files changed, 1 insertions, 2 deletions
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 <shared/mem.h>
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;