diff options
author | Luigi Scarso <luigi.scarso@gmail.com> | 2017-04-06 15:02:01 +0000 |
---|---|---|
committer | Luigi Scarso <luigi.scarso@gmail.com> | 2017-04-06 15:02:01 +0000 |
commit | 70495de22861ee04764c072c90c1dfff4b23e208 (patch) | |
tree | d0798db841c6eba70eda826cd362fc8d80226485 /Build/source/texk/web2c/luatexdir/lua | |
parent | 64e6dca332a20a3a2590166f59084da9716017e0 (diff) |
sync with luatex 1.0.4
git-svn-id: svn://tug.org/texlive/trunk@43709 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/lua')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/lua/luainit.w | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Build/source/texk/web2c/luatexdir/lua/luainit.w b/Build/source/texk/web2c/luatexdir/lua/luainit.w index de2bf47cc46..c20d02ac647 100644 --- a/Build/source/texk/web2c/luatexdir/lua/luainit.w +++ b/Build/source/texk/web2c/luatexdir/lua/luainit.w @@ -933,7 +933,7 @@ void lua_initialize(int ac, char **av) /* Get the current locale (it should be C ) */ /* and save LC_CTYPE, LC_COLLATE and LC_NUMERIC. */ /* Later luainterpreter() will consciously use them. */ - old_locale = setlocale (LC_ALL, NULL); + old_locale = xstrdup(setlocale (LC_ALL, NULL)); lc_ctype = NULL; lc_collate = NULL; lc_numeric = NULL; @@ -965,6 +965,7 @@ void lua_initialize(int ac, char **av) fprintf(stderr,"Unable to restore original locale:exit now.\n"); exit(1); } + xfree(old_locale); } else { fprintf(stderr,"Unable to store environment locale.\n"); } |