about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2024-08-05 15:49:15 -0700
committerBart Schaefer <schaefer@zsh.org>2024-08-05 15:49:15 -0700
commit65da4674410abac23e41f89f29f6613d74858854 (patch)
treecf133101fa722bee67ff98e7fc179d3a970ae3a9 /Src
parent4616ea398a5c1b04299dff9d25a8bc264c685540 (diff)
downloadzsh-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.c2
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);