1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-10 12:40:58 +02:00

53026: fix failure to free old value when setting new value of reference

This commit is contained in:
Jun. T 2024-08-06 14:37:39 -07:00 committed by Bart Schaefer
parent 72751bfe1f
commit b2f24ff0d2
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2024-08-06 Bart Schaefer <schaefer@zsh.org>
* Jun.T: 53026: Src/params.c: fix failure to free old value when
setting new value of reference
2024-08-05 Bart Schaefer <schaefer@zsh.org>
* 53025: Src/loop.c, Src/params.c: fix two memory leaks and two

View file

@ -482,7 +482,8 @@ static initparam argvparam_pm = IPDEF9("", &pparams, NULL, \
#define GETREFNAME(PM) (((PM)->node.flags & PM_SPECIAL) ? \
(PM)->gsu.s->getfn(PM) : (PM)->u.str)
#define SETREFNAME(PM,S) (((PM)->node.flags & PM_SPECIAL) ? \
(PM)->gsu.s->setfn(PM,(S)) : ((PM)->u.str = (S)))
(PM)->gsu.s->setfn(PM,(S)) : \
(zsfree((PM)->u.str), (PM)->u.str = (S)))
static Param argvparam;