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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-08-11 10:07:15 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-08-11 10:10:36 +0300
commitbb5cc3bccf4901a1759b171033147e717d9eb1c4 (patch)
treea08dfb030ad3f9d31d1b98330e918eb1d157a93b /source
parent9adedb26055f03263fefba380980ee2abcb5327e (diff)
Fix memory leak setting error text in the data-transfer modifier
Diffstat (limited to 'source')
-rw-r--r--source/blender/modifiers/intern/MOD_datatransfer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c
index 0b205ec4fc5..031b82fa89e 100644
--- a/source/blender/modifiers/intern/MOD_datatransfer.c
+++ b/source/blender/modifiers/intern/MOD_datatransfer.c
@@ -229,7 +229,9 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh *
&reports);
if (BKE_reports_contain(&reports, RPT_ERROR)) {
- BKE_modifier_set_error(md, "%s", BKE_reports_string(&reports, RPT_ERROR));
+ const char *report_str = BKE_reports_string(&reports, RPT_ERROR);
+ BKE_modifier_set_error(md, "%s", report_str);
+ MEM_freeN((void *)report_str);
}
else if ((dtmd->data_types & DT_TYPE_LNOR) && !(me->flag & ME_AUTOSMOOTH)) {
BKE_modifier_set_error((ModifierData *)dtmd, "Enable 'Auto Smooth' in Object Data Properties");