about summary refs log tree commit diff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-04-06 09:55:49 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-04-06 09:55:49 -0700
commitf61037a0b04616f40f5c849a5f590232f3cff235 (patch)
tree6f403112a9474a281688f594e5d1c185ecef64c6 /Src/hist.c
parent60bedea3e712178beac392af1ca6ed7291630459 (diff)
downloadzsh-f61037a0b04616f40f5c849a5f590232f3cff235.tar.gz
zsh-f61037a0b04616f40f5c849a5f590232f3cff235.tar.xz
zsh-f61037a0b04616f40f5c849a5f590232f3cff235.zip
32531: fix memory leaks detected by valgrind
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 1845bd8ad..16249125b 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -1764,7 +1764,8 @@ chrealpath(char **junkptr)
 	str++;
     }
 
-    *junkptr = metafy(bicat(real, nonreal), -1, META_HEAPDUP);
+    *junkptr = metafy(str = bicat(real, nonreal), -1, META_HEAPDUP);
+    zsfree(str);
 #ifdef HAVE_CANONICALIZE_FILE_NAME
     free(real);
 #endif