diff --git a/src/spawn.c b/src/spawn.c index 15d3b6bd..787d02a1 100644 --- a/src/spawn.c +++ b/src/spawn.c @@ -198,6 +198,8 @@ spawn_and_store_stdout(const char *prog, char *const argv[], char **outp) b = NULL; } + close(fd[0]); + if(totalsize == 0) { free(b); *outp = NULL;