summaryrefslogtreecommitdiff
path: root/libyasm/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'libyasm/file.c')
-rw-r--r--libyasm/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libyasm/file.c b/libyasm/file.c
index fc7dab6c..ea9f603b 100644
--- a/libyasm/file.c
+++ b/libyasm/file.c
@@ -473,7 +473,7 @@ yasm__createpath_common(const char *path, int win)
size_t len, lth;
lth = len = strlen(path);
- ts = tp = (char *) malloc(len + 1);
+ ts = tp = (char *) yasm_xmalloc(len + 1);
pe = pp + len;
while (pe > pp) {
if ((win && *pe == '\\') || *pe == '/')
@@ -523,7 +523,7 @@ yasm__createpath_common(const char *path, int win)
}
*tp++ = *pp++;
}
- free(ts);
+ yasm_xfree(ts);
return lth;
}