diff --git a/common/hush.c b/common/hush.c index 053d9a5..f432c0c 100644 --- a/common/hush.c +++ b/common/hush.c @@ -1436,6 +1436,7 @@ rcode = parse_stream(&temp, ctx, inp, '\n'); if (rcode != 1 && ctx->old_flag != 0) { syntax(); + return 1; } if (rcode != 1 && ctx->old_flag == 0) { done_word(&temp, ctx); @@ -1460,8 +1461,9 @@ inp->__promptme = 1; temp.nonnull = 0; temp.quote = 0; - inp->p = NULL; 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 */