about summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c
index 47fa63567..738753377 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -2177,7 +2177,7 @@ get_match_ret(char *s, int b, int e, int fl, char *replstr)
     if (replstr) {
 	if ((fl & SUB_GLOBAL) && repllist) {
 	    /* We are replacing the chunk, just add this to the list */
-	    Repldata rd = (Repldata) halloc(sizeof(*rd));
+	    Repldata rd = (Repldata) zhalloc(sizeof(*rd));
 	    rd->b = b;
 	    rd->e = e;
 	    addlinknode(repllist, rd);
@@ -2481,7 +2481,7 @@ getmatch(char **sp, char *pat, int fl, int n, char *replstr)
 	    i = rd->e;		/* start of next chunk of *sp */
 	}
 	lleft += l - i;	/* final chunk from *sp */
-	start = t = halloc(lleft+1);
+	start = t = zhalloc(lleft+1);
 	i = 0;
 	for (nd = firstnode(repllist); nd; incnode(nd)) {
 	    rd = (Repldata) getdata(nd);