diff options
author | dzwdz | 2022-08-19 18:03:59 +0200 |
---|---|---|
committer | dzwdz | 2022-08-19 18:03:59 +0200 |
commit | 7a4bc281958c639cd52ff4f192933aa161ba81a4 (patch) | |
tree | 6afc254b32bc724d872227f4fb3699ef03f511a0 /src/kernel/handle.c | |
parent | e9161cdcda9e5170f3ea5f18a8275395004ffce4 (diff) |
kernel: kzalloc
Diffstat (limited to 'src/kernel/handle.c')
-rw-r--r-- | src/kernel/handle.c | 3 |
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; |