[tyndur-devel] [PATCH 1/2] libc: Fehlendes v() in wait_child_add
Kevin Wolf ·
! libc: wait_child_add hat im Fehlerfall ein v() vergessen Signed-off-by: Kevin Wolf <kevin at tyndur.org> --- src/modules/lib/posix/wait.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/lib/posix/wait.c b/src/modules/lib/posix/wait.c index e7d52a6..2f32ccb 100644 --- a/src/modules/lib/posix/wait.c +++ b/src/modules/lib/posix/wait.c @@ -84,11 +84,11 @@ void wait_child_add(pid_t pid) { p(); struct wait_child* wait_child = wait_child_get(pid); - - // Es kann sein, dass der Prozess schon terminiert hat, wenn diese funktion + + // Es kann sein, dass der Prozess schon terminiert hat, wenn diese Funktion // aufgerufen wird! if (wait_child != NULL) { - return; + goto out; } wait_child = malloc(sizeof(struct wait_child)); @@ -98,7 +98,8 @@ void wait_child_add(pid_t pid) wait_child->running = true; wait_child->status = -1; list_push(wait_list, wait_child); - + +out: v(); } -- 1.6.0.2