mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
18543: memory leak vared'ing arrays
This commit is contained in:
parent
09c5818b39
commit
6d9135befe
@ -1,3 +1,8 @@
|
||||
2003-05-19 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 18548: Src/Zle/zle_main.c: memory leak when vared'ing arrays
|
||||
spotted by valgrind (18543).
|
||||
|
||||
2003-05-15 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 18530: Src/builtin.c, Src/options.c, Doc/Zsh/builtins.yo:
|
||||
|
@ -1177,9 +1177,10 @@ bin_vared(char *name, char **args, Options ops, int func)
|
||||
|
||||
/*
|
||||
* Use spacesplit with fourth argument 1: identify quoted separators,
|
||||
* unquote but don't split.
|
||||
* and unquote. This duplicates the string, so we still need to free.
|
||||
*/
|
||||
a = spacesplit(t, 1, 0, 1);
|
||||
zsfree(t);
|
||||
if (PM_TYPE(pm->flags) == PM_ARRAY)
|
||||
setaparam(args[0], a);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user