mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
19361: Memory leaks
This commit is contained in:
parent
cf2e6a27d5
commit
1a89fbabb4
3 changed files with 31 additions and 4 deletions
|
|
@ -2255,7 +2255,15 @@ bin_typeset(char *name, char **argv, Options ops, int func)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* pm->ename is only deleted when the struct is, so
|
||||
* we need to free it here if it already exists.
|
||||
*/
|
||||
if (pm->ename)
|
||||
zsfree(pm->ename);
|
||||
pm->ename = ztrdup(asg->name);
|
||||
if (apm->ename)
|
||||
zsfree(apm->ename);
|
||||
apm->ename = ztrdup(asg0.name);
|
||||
if (oldval)
|
||||
setsparam(asg0.name, oldval);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue