Plug another memory leak
authorEric Andersen <andersen@codepoet.org>
Thu, 24 May 2001 16:19:36 +0000 (16:19 -0000)
committerEric Andersen <andersen@codepoet.org>
Thu, 24 May 2001 16:19:36 +0000 (16:19 -0000)
hush.c
shell/hush.c

diff --git a/hush.c b/hush.c
index bb139717956cff2340c81aec2c8aeeb0fc72692c..5c129ce17fefc13a97df40181eb96ae89c913ef9 100644 (file)
--- a/hush.c
+++ b/hush.c
@@ -2494,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;
 }
index bb139717956cff2340c81aec2c8aeeb0fc72692c..5c129ce17fefc13a97df40181eb96ae89c913ef9 100644 (file)
@@ -2494,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;
 }