diff options
author | Bart Schaefer <schaefer@zsh.org> | 2024-08-05 15:49:15 -0700 |
---|---|---|
committer | Bart Schaefer <schaefer@zsh.org> | 2024-08-05 15:49:15 -0700 |
commit | 65da4674410abac23e41f89f29f6613d74858854 (patch) | |
tree | cf133101fa722bee67ff98e7fc179d3a970ae3a9 /Src | |
parent | 4616ea398a5c1b04299dff9d25a8bc264c685540 (diff) | |
download | zsh-65da4674410abac23e41f89f29f6613d74858854.tar.gz zsh-65da4674410abac23e41f89f29f6613d74858854.tar.xz zsh-65da4674410abac23e41f89f29f6613d74858854.zip |
53023: fix memory leak of unset private parameter
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c index f65aa1e80..83bdb785d 100644 --- a/Src/params.c +++ b/Src/params.c @@ -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); |