aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-02-22 12:23:03 +0000
committerChristian Grothoff <christian@grothoff.org>2010-02-22 12:23:03 +0000
commitbc8e868c76a54685f85d0668aaeeb843c27c91c1 (patch)
treeedf681ec1c7166a3ff78b3a9a1166e9715093e7b /src
parent0223276adfcb6e394ba77f3bdb30131c0bf1eabb (diff)
downloadgnunet-bc8e868c76a54685f85d0668aaeeb843c27c91c1.tar.gz
gnunet-bc8e868c76a54685f85d0668aaeeb843c27c91c1.zip
fixing leaks
Diffstat (limited to 'src')
-rw-r--r--src/util/test_os_start_process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/test_os_start_process.c b/src/util/test_os_start_process.c
index 8453bde05..5a47c2f5c 100644
--- a/src/util/test_os_start_process.c
+++ b/src/util/test_os_start_process.c
@@ -107,13 +107,11 @@ static void
107task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) 107task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
108{ 108{
109 char *fn; 109 char *fn;
110 char *buf;
111 int fd_stdout; 110 int fd_stdout;
112 int fd_stdin; 111 int fd_stdin;
113 112
114 const struct GNUNET_DISK_FileHandle *stdout_read_handle; 113 const struct GNUNET_DISK_FileHandle *stdout_read_handle;
115 114
116 buf = GNUNET_malloc(strlen(test_phrase) + 1);
117 GNUNET_asprintf(&fn, "cat"); 115 GNUNET_asprintf(&fn, "cat");
118 116
119 hello_pipe_stdin = GNUNET_DISK_pipe(GNUNET_YES); 117 hello_pipe_stdin = GNUNET_DISK_pipe(GNUNET_YES);
@@ -122,11 +120,13 @@ task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
122 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL)) 120 if ((hello_pipe_stdout == NULL) || (hello_pipe_stdin == NULL))
123 { 121 {
124 ok = 1; 122 ok = 1;
123 GNUNET_free (fn);
125 return; 124 return;
126 } 125 }
127 126
128 pid = GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn, 127 pid = GNUNET_OS_start_process (hello_pipe_stdin, hello_pipe_stdout, fn,
129 "test_gnunet_echo_hello", "-", NULL); 128 "test_gnunet_echo_hello", "-", NULL);
129 GNUNET_free (fn);
130 130
131 /* Close the write end of the read pipe */ 131 /* Close the write end of the read pipe */
132 GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE); 132 GNUNET_DISK_pipe_close_end(hello_pipe_stdout, GNUNET_DISK_PIPE_END_WRITE);