[Bf-blender-cvs] [f0259d0] master: Fix for double freeing of MEM_guardedalloc'ed memory originating from BLF_lang_set().
Tamito Kajiyama
noreply at git.blender.org
Tue Aug 5 04:38:59 CEST 2014
Commit: f0259d0a5396ebedcb9b8fdb1e3d4bafa8d9cc34
Author: Tamito Kajiyama
Date: Tue Aug 5 11:21:02 2014 +0900
Branches: master
https://developer.blender.org/rBf0259d0a5396ebedcb9b8fdb1e3d4bafa8d9cc34
Fix for double freeing of MEM_guardedalloc'ed memory originating from BLF_lang_set().
===================================================================
M source/blender/blenfont/intern/blf_lang.c
===================================================================
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 2852b81..12d7182 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;
More information about the Bf-blender-cvs
mailing list