mirror of
https://github.com/zsh-users/zsh
synced 2024-09-30 05:06:09 +00:00
53023: fix memory leak of unset private parameter
This commit is contained in:
parent
4616ea398a
commit
65da467441
|
@ -1,3 +1,7 @@
|
|||
2024-08-05 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 53023: Src/params.c: fix memory leak of unset private parameter
|
||||
|
||||
2024-08-04 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* Philippe Altherr: 53005: Src/exec.c: off-by-one error when
|
||||
|
|
|
@ -3790,7 +3790,7 @@ unsetparam_pm(Param pm, int altflag, int exp)
|
|||
altremove = NULL;
|
||||
|
||||
pm->node.flags &= ~PM_DECLARED; /* like ksh, not like bash */
|
||||
if (!(pm->node.flags & PM_UNSET))
|
||||
if (!(pm->node.flags & PM_UNSET) || (pm->node.flags & PM_REMOVABLE))
|
||||
pm->gsu.s->unsetfn(pm, exp);
|
||||
if (pm->env)
|
||||
delenv(pm);
|
||||
|
|
Loading…
Reference in a new issue