diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2015-01-05 16:08:56 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2015-01-06 23:47:30 +0100 |
commit | 1507719d0a5c8ff8694583fbc4c993e937fb9266 (patch) | |
tree | 38bfa3cc601cd1bf8841e41843daf582528a2fb6 /Src/builtin.c | |
parent | adae710eb057c291cadd393b778416bf2de2218a (diff) | |
download | zsh-1507719d0a5c8ff8694583fbc4c993e937fb9266.tar.gz zsh-1507719d0a5c8ff8694583fbc4c993e937fb9266.tar.xz zsh-1507719d0a5c8ff8694583fbc4c993e937fb9266.zip |
34112: typeset: fix leak of oldval
Found by Coverity (Issue 1255803).
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 228eaaada..5138c70fd 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -2510,6 +2510,8 @@ bin_typeset(char *name, char **argv, Options ops, int func) asg->name), func, (on | PM_ARRAY) & ~PM_EXPORTED, off, roff, asg->value, NULL, ops, 0))) { + if (oldval) + zsfree(oldval); unqueue_signals(); return 1; } |