summaryrefslogtreecommitdiff
path: root/Build/source/texk/kpathsea/variable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/kpathsea/variable.c')
-rw-r--r--Build/source/texk/kpathsea/variable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Build/source/texk/kpathsea/variable.c b/Build/source/texk/kpathsea/variable.c
index 7632f576c70..07881f773d3 100644
--- a/Build/source/texk/kpathsea/variable.c
+++ b/Build/source/texk/kpathsea/variable.c
@@ -61,9 +61,9 @@ kpse_var_value P1C(const_string, var)
worry about doing the ~ expansion. */
if (ret) {
string tmp = kpse_var_expand (ret);
- if (tmp != ret) {
- free (ret);
- }
+ /* We don't want to free the previous value of ret here; apparently
+ it's used later, somewhere, somehow. (The end result was a crash
+ when making tex.fmt.) Sigh. */
ret = kpse_tilde_expand (tmp);
if (ret != tmp) {
free (tmp);