From 2229fd91f7230ae7068814ae029b733945852eb1 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Tue, 2 Apr 2024 09:17:06 +0200 Subject: Kernel: Fix some memory leaks --- userland/sh/sh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'userland/sh') diff --git a/userland/sh/sh.c b/userland/sh/sh.c index e7741aa..e386ef6 100644 --- a/userland/sh/sh.c +++ b/userland/sh/sh.c @@ -49,7 +49,9 @@ void remove_child_process(int pid) { void slaugther_children(void) { struct child_process *child = children; for (; child; child = child->next) { - kill(child->pid, SIGTERM); + int fd = open_process(child->pid); + kill(fd, SIGTERM); + close(fd); } } -- cgit v1.2.3