diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/readline.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/readline.c b/Modules/readline.c index 5053d1c..7535ecf 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -611,7 +611,7 @@ static void setup_readline(void) { #ifdef SAVE_LOCALE - char *saved_locale = setlocale(LC_CTYPE, NULL); + char *saved_locale = strdup(setlocale(LC_CTYPE, NULL)); #endif using_history(); @@ -652,6 +652,7 @@ setup_readline(void) #ifdef SAVE_LOCALE setlocale(LC_CTYPE, saved_locale); /* Restore locale */ + free(saved_locale); #endif } |