Plug another memory leak in hush. This one showed up when backticked

commands were run.  This one was sure a bugger to find.
 -Erik
This commit is contained in:
Eric Andersen 2001-05-23 23:46:09 +00:00
parent bf7df04ec1
commit a15dc15f12
2 changed files with 2 additions and 0 deletions

1
hush.c
View File

@ -2166,6 +2166,7 @@ static int process_command_subs(o_string *dest, struct p_context *ctx, struct in
* to the KISS philosophy of this program. */
mark_closed(fileno(p));
retcode=pclose(p);
free_pipe_list(inner.list_head,0);
debug_printf("pclosed, retcode=%d\n",retcode);
/* XXX this process fails to trim a single trailing newline */
return retcode;

View File

@ -2166,6 +2166,7 @@ static int process_command_subs(o_string *dest, struct p_context *ctx, struct in
* to the KISS philosophy of this program. */
mark_closed(fileno(p));
retcode=pclose(p);
free_pipe_list(inner.list_head,0);
debug_printf("pclosed, retcode=%d\n",retcode);
/* XXX this process fails to trim a single trailing newline */
return retcode;