diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-16 20:23:44 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-05-16 20:23:44 +0200 |
commit | e741110f5a4089f22dbaae97443753acd4851bdd (patch) | |
tree | 86acf2e6c390d633da5be4a4ea4e1c6d024c4bec /common/hush.c | |
parent | 9115339720c3df3c9b40dae7adbef137362efcc0 (diff) | |
parent | 0d188aca536284f3c9650d8857c43c0dd5a81c2c (diff) | |
download | barebox-e741110f5a4089f22dbaae97443753acd4851bdd.tar.gz barebox-e741110f5a4089f22dbaae97443753acd4851bdd.tar.xz |
Merge branch 'master' into next
Diffstat (limited to 'common/hush.c')
-rw-r--r-- | common/hush.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/hush.c b/common/hush.c index d915f9ed5b..3d51e4cc19 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1590,6 +1590,7 @@ static int parse_stream_outer(struct p_context *ctx, struct in_str *inp, int fla if (rcode != 1 && ctx->old_flag != 0) { syntax(); + return 1; } if (rcode != 1 && ctx->old_flag == 0) { done_word(&temp, ctx); @@ -1614,8 +1615,9 @@ static int parse_stream_outer(struct p_context *ctx, struct in_str *inp, int fla inp->__promptme = 1; temp.nonnull = 0; temp.quote = 0; - inp->p = NULL; - free_pipe_list(ctx->list_head, 0); + free_pipe_list(ctx->list_head,0); + b_free(&temp); + return 1; } b_free(&temp); } while (rcode != -1 && !(flag & FLAG_EXIT_FROM_LOOP)); /* loop on syntax errors, return on EOF */ |