Fix a file descriptor leak

This commit is contained in:
Andreas Öman 2009-12-08 22:27:01 +00:00
parent 2056c0544b
commit 114b641bdd

View file

@ -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;