diff options
author | 2013-12-26 13:36:43 -0800 | |
---|---|---|
committer | 2013-12-26 13:36:43 -0800 | |
commit | c1a13ae8bcfed6d1ce38453e7fadb2fee887a283 (patch) | |
tree | b41d968892a185fce9c63659f3f6834d8af1e0cb /parse_execution.cpp | |
parent | 6536ffe178922750756e860561c2205513067b3b (diff) |
Fix a few errors identified by testing new parser
Diffstat (limited to 'parse_execution.cpp')
-rw-r--r-- | parse_execution.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/parse_execution.cpp b/parse_execution.cpp index 72ff611c..2aa32f82 100644 --- a/parse_execution.cpp +++ b/parse_execution.cpp @@ -545,6 +545,14 @@ int parse_execution_context_t::run_1_job(const parse_node_t &job_node) /* Populate the job. This may fail for reasons like command_not_found */ bool process_errored = ! this->populate_job_from_job_node(j, job_node); + /* If we errored, we have to clean up the job */ + if (process_errored) + { + assert(parser->current_block()->job == j); + parser->current_block()->job = NULL; + job_free(j); + } + /* Store time it took to 'parse' the command */ if (do_profile) { |