about summary refs log tree commit diff
path: root/Src/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/utils.c b/Src/utils.c
index bf4ae325d..aa2a3738b 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -1770,7 +1770,7 @@ zjoin(char **arr, int delim, int heap)
     for (s = arr; *s; s++)
 	len += strlen(*s) + 1;
     if (!len)
-	return "";
+	return heap? "" : ztrdup("");
     ptr = ret = (heap ? (char *) hcalloc(len) : (char *) zcalloc(len));
     for (s = arr; *s; s++) {
 	strucpy(&ptr, *s);