about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/compat.c2
-rw-r--r--Src/init.c2
2 files changed, 2 insertions, 2 deletions
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;