mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-08 12:01:21 +02:00
53738: Fix memory leak in command substitution.
This happened if the substituion had a here document but the parse failed.
This commit is contained in:
parent
4171ca5648
commit
96beb5ced9
2 changed files with 7 additions and 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>
|
2025-06-05 Mikael Magnusson <mikachu@gmail.com>
|
||||||
|
|
||||||
* unposted: Completion/Unix/Command/_subversion: fix return
|
* unposted: Completion/Unix/Command/_subversion: fix return
|
||||||
|
|
|
@ -340,6 +340,7 @@ parse_context_restore(const struct parse_stack *ps, int toplevel)
|
||||||
inrepeat_ = ps->inrepeat_;
|
inrepeat_ = ps->inrepeat_;
|
||||||
intypeset = ps->intypeset;
|
intypeset = ps->intypeset;
|
||||||
|
|
||||||
|
clear_hdocs();
|
||||||
hdocs = ps->hdocs;
|
hdocs = ps->hdocs;
|
||||||
eclen = ps->eclen;
|
eclen = ps->eclen;
|
||||||
ecused = ps->ecused;
|
ecused = ps->ecused;
|
||||||
|
@ -583,6 +584,7 @@ empty_eprog(Eprog p)
|
||||||
return (!p || !p->prog || *p->prog == WCB_END());
|
return (!p || !p->prog || *p->prog == WCB_END());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**/
|
||||||
static void
|
static void
|
||||||
clear_hdocs(void)
|
clear_hdocs(void)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue