Fix a file descriptor leak
This commit is contained in:
parent
2056c0544b
commit
114b641bdd
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue