-fix memory leak
authorChristian Grothoff <christian@grothoff.org>
Wed, 29 Feb 2012 09:55:59 +0000 (09:55 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 29 Feb 2012 09:55:59 +0000 (09:55 +0000)
src/util/os_priority.c

index 4e73f84df60a489e8ed12afb64daa6a7310fd856..7003abf02bab01dbcf2a6ea8931085d85e4ad1e7 100644 (file)
@@ -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)