summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvipdfmx/src/dpxfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/xdvipdfmx/src/dpxfile.c')
-rw-r--r--Build/source/texk/xdvipdfmx/src/dpxfile.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Build/source/texk/xdvipdfmx/src/dpxfile.c b/Build/source/texk/xdvipdfmx/src/dpxfile.c
index eca78d0f9ce..09e7c4df6cc 100644
--- a/Build/source/texk/xdvipdfmx/src/dpxfile.c
+++ b/Build/source/texk/xdvipdfmx/src/dpxfile.c
@@ -44,6 +44,8 @@ dpx_file_set_verbose (void)
}
+#define mystrdup(s1) (char *) MEM_ADD(strdup(s1))
+
/* Kpathsea library does not check file type. */
static int qcheck_filetype (const char *fqpn, int type);
@@ -538,7 +540,7 @@ dpx_find_type1_file (const char *filename)
char *fqpn = NULL;
if (is_absolute_path(filename))
- fqpn = strdup(filename);
+ fqpn = mystrdup(filename);
else
fqpn = kpse_find_file(filename, kpse_type1_format, 0);
if (fqpn && !qcheck_filetype(fqpn, DPX_RES_TYPE_T1FONT)) {
@@ -556,7 +558,7 @@ dpx_find_truetype_file (const char *filename)
char *fqpn = NULL;
if (is_absolute_path(filename))
- fqpn = strdup(filename);
+ fqpn = mystrdup(filename);
else
fqpn = kpse_find_file(filename, kpse_truetype_format, 0);
if (fqpn && !qcheck_filetype(fqpn, DPX_RES_TYPE_TTFONT)) {
@@ -577,7 +579,7 @@ dpx_find_opentype_file (const char *filename)
q = ensuresuffix(filename, ".otf");
#ifndef MIKTEX
if (is_absolute_path(q))
- fqpn = strdup(q);
+ fqpn = mystrdup(q);
else
fqpn = kpse_find_file(q, kpse_opentype_format, 0);
if (!fqpn) {