about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/compat.c2
-rw-r--r--Src/init.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cd6637c86..a76808be2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-04-25  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 34961: Src/compat.c, Src/init.c: replace a couple of free() with
+	zfree() for consistency.
+
 	* 34961: Completion/Base/Completer/_expand: add backslash to alias
 	expansion matching (related to workers/32186)
 
diff --git a/Src/compat.c b/Src/compat.c
index 09b3d6a5f..b3a8b063c 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -443,7 +443,7 @@ zgetcwd(void)
 	ret = getcwd(cwdbuf, PATH_MAX);
 	if (ret)
 	    ret = dupstring(ret);
-	free(cwdbuf);
+	zfree(cwdbuf, PATH_MAX);
 #endif /* GETCWD_CALLS_MALLOC */
     }
 #endif /* HAVE_GETCWD */
diff --git a/Src/init.c b/Src/init.c
index 3e41fb9dd..102276a64 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1409,7 +1409,7 @@ source(char *s)
 	retflag = 0;
     scriptname = old_scriptname;
     scriptfilename = old_scriptfilename;
-    free(cmdstack);
+    zfree(cmdstack, CMDSTACKSZ);
     cmdstack = ocs;
     cmdsp = ocsp;