Some more patchelttes from Larry Doolittle.
[oweals/busybox.git] / hush.c
diff --git a/hush.c b/hush.c
index 57b85d1bc5574fbb30c8719a96a8079219acab57..5c129ce17fefc13a97df40181eb96ae89c913ef9 100644 (file)
--- a/hush.c
+++ b/hush.c
@@ -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;
@@ -2493,6 +2494,7 @@ int parse_stream_outer(struct in_str *inp)
                done_word(&temp, &ctx);
                done_pipe(&ctx,PIPE_SEQ);
                run_list(ctx.list_head);
+               b_free(&temp);
        } while (rcode != -1);   /* loop on syntax errors, return on EOF */
        return 0;
 }