Commit cb2623e6 authored by Thomas White's avatar Thomas White
Browse files

Fix leaked fds

parent ce55f225
......@@ -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. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment