gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r10403 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r10403 - gnunet/src/util
Date: Mon, 22 Feb 2010 13:23:03 +0100

Author: grothoff
Date: 2010-02-22 13:23:03 +0100 (Mon, 22 Feb 2010)
New Revision: 10403

Modified:
   gnunet/src/util/test_os_start_process.c
Log:
fixing leaks

Modified: gnunet/src/util/test_os_start_process.c
===================================================================
--- gnunet/src/util/test_os_start_process.c     2010-02-22 11:32:41 UTC (rev 
10402)
+++ gnunet/src/util/test_os_start_process.c     2010-02-22 12:23:03 UTC (rev 
10403)
@@ -107,13 +107,11 @@
 task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   char *fn;
-  char *buf;
   int fd_stdout;
   int fd_stdin;
 
   const struct GNUNET_DISK_FileHandle *stdout_read_handle;
 
-  buf = GNUNET_malloc(strlen(test_phrase) + 1);
   GNUNET_asprintf(&fn, "cat");
 
   hello_pipe_stdin = GNUNET_DISK_pipe(GNUNET_YES);
@@ -122,11 +120,13 @@
   if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
     {
       ok = 1;
+      GNUNET_free (fn);
       return;
     }
 
   pid = GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn,
                                  "test_gnunet_echo_hello", "-", NULL);
+  GNUNET_free (fn);
 
   /* Close the write end of the read pipe */
   GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]