diff options
-rw-r--r-- | src/libthread/exec.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libthread/exec.c b/src/libthread/exec.c index d7452488..a6d536ec 100644 --- a/src/libthread/exec.c +++ b/src/libthread/exec.c @@ -93,6 +93,7 @@ _threadspawn(int fd[3], char *cmd, char *argv[]) n = read(p[0], exitstr, sizeof exitstr-1); close(p[0]); if(n > 0){ /* exec failed */ + free(waitfor(pid)); exitstr[n] = 0; errno = atoi(exitstr); return -1; |