diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-08-05 06:21:02 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2014-08-05 06:21:02 +0400 |
commit | f0259d0a5396ebedcb9b8fdb1e3d4bafa8d9cc34 (patch) | |
tree | 394ee188898cf9fc311cbe1f67d62a91931e5bfb | |
parent | 6b6ea0485f3fee08f87af80caf8f7d3a2b3792cb (diff) |
Fix for double freeing of MEM_guardedalloc'ed memory originating from BLF_lang_set().
-rw-r--r-- | source/blender/blenfont/intern/blf_lang.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c index 2852b8161c8..12d71827136 100644 --- a/source/blender/blenfont/intern/blf_lang.c +++ b/source/blender/blenfont/intern/blf_lang.c @@ -235,15 +235,11 @@ void BLF_lang_set(const char *str) else { short_locale_utf8 = BLI_sprintfN("%s.UTF-8", short_locale); } + bl_locale_set(short_locale_utf8); + MEM_freeN((void *)short_locale_utf8); } else { - short_locale_utf8 = short_locale; - } - - bl_locale_set(short_locale_utf8); - - if (short_locale[0]) { - MEM_freeN((void *)short_locale_utf8); + bl_locale_set(short_locale); } #else (void)str; |