diff options
| author | Peter Stephenson <p.stephenson@samsung.com> | 2025-06-10 16:56:41 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.stephenson@samsung.com> | 2025-06-10 16:56:41 +0100 |
| commit | 96beb5ced9f3763dba142c15614476e043af3b43 (patch) | |
| tree | 3135b7bdb0470e3b79311251d77dc4edfa85e7c5 | |
| parent | 53734: update macos completions (diff) | |
| download | zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar.gz zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar.bz2 zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar.lz zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar.xz zsh-96beb5ced9f3763dba142c15614476e043af3b43.tar.zst zsh-96beb5ced9f3763dba142c15614476e043af3b43.zip | |
53738: Fix memory leak in command substitution.
This happened if the substituion had a here document but the parse failed.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Src/parse.c | 2 |
2 files changed, 7 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2025-06-10 Peter Stephenson <p.stephenson@samsung.com> + + * 53738: Src/parse.c: memory leak in here doc in failed command + substitution. + 2025-06-05 Mikael Magnusson <mikachu@gmail.com> * unposted: Completion/Unix/Command/_subversion: fix return diff --git a/Src/parse.c b/Src/parse.c index 8edc701f4..4ce5a4650 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -340,6 +340,7 @@ parse_context_restore(const struct parse_stack *ps, int toplevel) inrepeat_ = ps->inrepeat_; intypeset = ps->intypeset; + clear_hdocs(); hdocs = ps->hdocs; eclen = ps->eclen; ecused = ps->ecused; @@ -583,6 +584,7 @@ empty_eprog(Eprog p) return (!p || !p->prog || *p->prog == WCB_END()); } +/**/ static void clear_hdocs(void) { |
