summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Src/math.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e40242eb8..e383ab9b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2015-10-21  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* unposted: Src/math.c: strdup should be ztrdup
+
 	* 36909: Src/hist.c: in getargs(), sanity-check the offsets for
 	start and end of the requested words, in case of overflow
 
diff --git a/Src/math.c b/Src/math.c
index 56565a629..eee21e146 100644
--- a/Src/math.c
+++ b/Src/math.c
@@ -535,7 +535,7 @@ lexconstant(void)
 	for (ptr2 = ptr; ptr2 < nptr; ptr2++) {
 	    if (*ptr2 == '_') {
 		int len = nptr - ptr;
-		ptr = strdup(ptr);
+		ptr = ztrdup(ptr);
 		for (ptr2 = ptr; len; len--) {
 		    if (*ptr2 == '_')
 			chuck(ptr2);