summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/kpsewhich.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/kpsewhich.c')
-rw-r--r--Build/source/texk/kpathsea/kpsewhich.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/Build/source/texk/kpathsea/kpsewhich.c b/Build/source/texk/kpathsea/kpsewhich.c
index 7746bd7058d..7c453bc8eb0 100644
--- a/Build/source/texk/kpathsea/kpsewhich.c
+++ b/Build/source/texk/kpathsea/kpsewhich.c
@@ -129,7 +129,7 @@ static unsigned
find_dpi (string s)
{
unsigned dpi_number = 0;
- string extension = find_suffix (s);
+ const_string extension = find_suffix (s);
if (extension != NULL)
sscanf (extension, "%u", &dpi_number);
@@ -342,12 +342,15 @@ lookup (kpathsea kpse, string name)
case kpse_any_glyph_format:
{
kpse_glyph_file_type glyph_ret;
+ string temp = remove_suffix (name);
/* Try to extract the resolution from the name. */
unsigned local_dpi = find_dpi (name);
if (!local_dpi)
local_dpi = dpi;
- ret = kpathsea_find_glyph (kpse, remove_suffix (name),
+ ret = kpathsea_find_glyph (kpse, temp,
local_dpi, fmt, &glyph_ret);
+ if (temp != name)
+ free (temp);
}
break;