aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-05-23 23:46:09 +0000
committerEric Andersen <andersen@codepoet.org>2001-05-23 23:46:09 +0000
commita15dc15f12766709ecd27be001a5832a11e6b353 (patch)
treed757df8dc707c1171e846c900c701081a30d780e
parentbf7df04ec131c2d72e39d3ff6f2f85be675f9370 (diff)
downloadbusybox-w32-a15dc15f12766709ecd27be001a5832a11e6b353.tar.gz
busybox-w32-a15dc15f12766709ecd27be001a5832a11e6b353.tar.bz2
busybox-w32-a15dc15f12766709ecd27be001a5832a11e6b353.zip
Plug another memory leak in hush. This one showed up when backticked
commands were run. This one was sure a bugger to find. -Erik
-rw-r--r--hush.c1
-rw-r--r--shell/hush.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/hush.c b/hush.c
index 57b85d1bc..bb1397179 100644
--- a/hush.c
+++ b/hush.c
@@ -2166,6 +2166,7 @@ static int process_command_subs(o_string *dest, struct p_context *ctx, struct in
2166 * to the KISS philosophy of this program. */ 2166 * to the KISS philosophy of this program. */
2167 mark_closed(fileno(p)); 2167 mark_closed(fileno(p));
2168 retcode=pclose(p); 2168 retcode=pclose(p);
2169 free_pipe_list(inner.list_head,0);
2169 debug_printf("pclosed, retcode=%d\n",retcode); 2170 debug_printf("pclosed, retcode=%d\n",retcode);
2170 /* XXX this process fails to trim a single trailing newline */ 2171 /* XXX this process fails to trim a single trailing newline */
2171 return retcode; 2172 return retcode;
diff --git a/shell/hush.c b/shell/hush.c
index 57b85d1bc..bb1397179 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2166,6 +2166,7 @@ static int process_command_subs(o_string *dest, struct p_context *ctx, struct in
2166 * to the KISS philosophy of this program. */ 2166 * to the KISS philosophy of this program. */
2167 mark_closed(fileno(p)); 2167 mark_closed(fileno(p));
2168 retcode=pclose(p); 2168 retcode=pclose(p);
2169 free_pipe_list(inner.list_head,0);
2169 debug_printf("pclosed, retcode=%d\n",retcode); 2170 debug_printf("pclosed, retcode=%d\n",retcode);
2170 /* XXX this process fails to trim a single trailing newline */ 2171 /* XXX this process fails to trim a single trailing newline */
2171 return retcode; 2172 return retcode;