diff options
author | Karl Berry <karl@freefriends.org> | 2008-01-15 16:15:22 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2008-01-15 16:15:22 +0000 |
commit | 866ffb1ed5b357aae044468790e53f80d7b977fa (patch) | |
tree | d9551d07e4dd2ed9aca876203c9f843a196fbcc4 /Build/source/texk/kpathsea/variable.c | |
parent | a3df5e2244a4c54e160882c400f2ea6a30f280eb (diff) |
only free if new memory
git-svn-id: svn://tug.org/texlive/trunk@6239 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/kpathsea/variable.c')
-rw-r--r-- | Build/source/texk/kpathsea/variable.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Build/source/texk/kpathsea/variable.c b/Build/source/texk/kpathsea/variable.c index 2e581f1bf9f..7632f576c70 100644 --- a/Build/source/texk/kpathsea/variable.c +++ b/Build/source/texk/kpathsea/variable.c @@ -61,8 +61,13 @@ 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); + } ret = kpse_tilde_expand (tmp); - free (tmp); + if (ret != tmp) { + free (tmp); + } } #ifdef KPSE_DEBUG |