diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-11-02 12:04:46 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-11-02 12:04:46 +0000 |
commit | 337b9dba1fe271eda69e3437c8632f33433bd1e3 (patch) | |
tree | bfa763c7820605ec7354929e06e7c8e2190da921 /Src/params.c | |
parent | 6bca0ecb48e06d4a94d23ca6c700d5e7ff6e4261 (diff) | |
download | zsh-337b9dba1fe271eda69e3437c8632f33433bd1e3.tar.gz zsh-337b9dba1fe271eda69e3437c8632f33433bd1e3.tar.xz zsh-337b9dba1fe271eda69e3437c8632f33433bd1e3.zip |
21974: memory leak with tied parameters
Diffstat (limited to 'Src/params.c')
-rw-r--r-- | Src/params.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c index 835c12230..1468c014a 100644 --- a/Src/params.c +++ b/Src/params.c @@ -2452,8 +2452,13 @@ stdunsetfn(Param pm, UNUSED(int exp)) pm->u.str = NULL; break; } - if (!(pm->flags & PM_SPECIAL)) + if ((pm->flags & (PM_SPECIAL|PM_TIED)) == PM_TIED) { + if (pm->ename) { + zsfree(pm->ename); + pm->ename = NULL; + } pm->flags &= ~PM_TIED; + } pm->flags |= PM_UNSET; } |