diff --git a/src/system/kernel/kernel_daemon.cpp b/src/system/kernel/kernel_daemon.cpp index 41e60c7179..6ce1712cbc 100644 --- a/src/system/kernel/kernel_daemon.cpp +++ b/src/system/kernel/kernel_daemon.cpp @@ -81,7 +81,7 @@ unregister_kernel_daemon(daemon_hook function, void* arg) if (daemon->function == function && daemon->arg == arg) { // found it! iterator.Remove(); - free(daemon); + delete daemon; return B_OK; } }