From d367690e5a16127c7d123a635300b802506b3a6e Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 29 Feb 2012 09:55:59 +0000 Subject: [PATCH] -fix memory leak --- src/util/os_priority.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/util/os_priority.c b/src/util/os_priority.c index 4e73f84df..7003abf02 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -443,7 +443,7 @@ GNUNET_OS_process_kill (struct GNUNET_OS_Process *proc, int sig) #endif } ret = GNUNET_DISK_file_write (proc->control_pipe, &sig, sizeof (sig)); - if (ret == sizeof (sig)) + if (ret == sizeof (sig)) return 0; /* pipe failed, try other methods */ switch (sig) @@ -491,10 +491,8 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process * proc) void GNUNET_OS_process_close (struct GNUNET_OS_Process *proc) { -#if ENABLE_WINDOWS_WORKAROUNDS - if (proc->control_pipe) + if (NULL != proc->control_pipe) GNUNET_DISK_file_close (proc->control_pipe); -#endif // FIXME NILS #ifdef WINDOWS if (proc->handle != NULL) -- 2.25.1