about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2015-04-25 12:40:35 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2015-04-25 12:40:35 -0700
commitfae07f65a3773dd7f8b82ce6169e5ff35766f8f9 (patch)
treeedcfbc627fea2a516155feeab41f7c1efef09618 /Src
parentfd574101a92d1df3e0aa7f91fb3feb4c6f3d0863 (diff)
downloadzsh-fae07f65a3773dd7f8b82ce6169e5ff35766f8f9.tar.gz
zsh-fae07f65a3773dd7f8b82ce6169e5ff35766f8f9.tar.xz
zsh-fae07f65a3773dd7f8b82ce6169e5ff35766f8f9.zip
34965: consistent use of zalloc/zrealloc/zfree
Diffstat (limited to 'Src')
-rw-r--r--Src/glob.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/glob.c b/Src/glob.c
index ad29223c9..057d44a17 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -437,7 +437,7 @@ insert(char *s, int checked)
 	matchptr++;
 
 	if (++matchct == matchsz) {
-	    matchbuf = (Gmatch )realloc((char *)matchbuf,
+	    matchbuf = (Gmatch)zrealloc((char *)matchbuf,
 					sizeof(struct gmatch) * (matchsz *= 2));
 
 	    matchptr = matchbuf + matchct;
@@ -1818,7 +1818,7 @@ zglob(LinkList list, LinkNode np, int nountok)
 	    badcshglob |= 1;	/* at least one cmd. line expansion failed */
 	} else if (isset(NOMATCH)) {
 	    zerr("no matches found: %s", ostr);
-	    free(matchbuf);
+	    zfree(matchbuf, 0);
 	    restore_globstate(saved);
 	    return;
 	} else {
@@ -1923,7 +1923,7 @@ zglob(LinkList list, LinkNode np, int nountok)
     } else if (!badcshglob && !isset(NOMATCH) && matchct == 1) {
 	insert_glob_match(list, node, (--matchptr)->name);
     }
-    free(matchbuf);
+    zfree(matchbuf, 0);
 
     restore_globstate(saved);
 }