diff options
author | Thomas White <taw@bitwiz.org.uk> | 2012-07-12 01:00:31 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2012-07-12 01:00:31 +0200 |
commit | cb2623e64fed28efdc0d3b3de2338ab57684985b (patch) | |
tree | 732fa612849c63f9428529c3cf4554cf2605e70c /src/indexamajig.c | |
parent | ce55f225c659adf6a96648e0faa223a7ea602858 (diff) |
Fix leaked fds
Diffstat (limited to 'src/indexamajig.c')
-rw-r--r-- | src/indexamajig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/indexamajig.c b/src/indexamajig.c index 7310d391..5a8bd816 100644 --- a/src/indexamajig.c +++ b/src/indexamajig.c @@ -1257,6 +1257,10 @@ int main(int argc, char *argv[]) free(result_fhs); fclose(fh); free(pids); + for ( j=0; j<i-1; j++ ) { + fclose(result_fhs[j]); + close(filename_pipes[j]); + } /* Child process gets the 'read' end of the filename * pipe, and the 'write' end of the result pipe. */ |