Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/python/intern/bpy_app_translations.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c
index 13ca90c4e34..dffa8f20fa3 100644
--- a/source/blender/python/intern/bpy_app_translations.c
+++ b/source/blender/python/intern/bpy_app_translations.c
@@ -73,7 +73,7 @@ typedef struct GHashKey {
static GHashKey *_ghashutil_keyalloc(const void *msgctxt, const void *msgid)
{
- GHashKey *key = MEM_mallocN(sizeof(GHashKey), "GHashPair");
+ GHashKey *key = MEM_mallocN(sizeof(GHashKey), "Py i18n GHashKey");
key->msgctxt = BLI_strdup(msgctxt ? msgctxt : BLF_I18NCONTEXT_DEFAULT_BPY_INTERN);
key->msgid = BLI_strdup(msgid);
return key;
@@ -286,6 +286,8 @@ const char *BPY_app_translations_py_pgettext(const char *msgctxt, const char *ms
tmp = BLI_ghash_lookup(_translations_cache, key);
+ _ghashutil_keyfree((void *)key);
+
if (tmp)
return tmp;
return msgid;