1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-01 18:30:55 +01:00

24045: fix memory leak where old value of an environment variable isn't freed

This commit is contained in:
Oliver Kiddle 2007-10-31 21:03:21 +00:00
parent 4b367d3d43
commit 4ac2515ed8
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2007-10-31 Oliver Kiddle <opk@zsh.org>
* 24045: Src/params.c: fix memory leak where old value of an
environment variable isn't freed
2007-10-31 Barton E. Schaefer <schaefer@zsh.org>
* 24043: Functions/Prompts/promptinit: emulate -L resets prompt

View file

@ -3998,6 +3998,8 @@ addenv(Param pm, char *value)
* the other branch? If so, we don't actually need to
* store pm->env at all, just a flag that the value was set.
*/
if (pm->env)
zsfree(pm->env);
pm->env = newenv;
#else
/*