diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-08-11 10:07:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-08-11 10:10:36 +0300 |
commit | bb5cc3bccf4901a1759b171033147e717d9eb1c4 (patch) | |
tree | a08dfb030ad3f9d31d1b98330e918eb1d157a93b /source/blender/modifiers/intern/MOD_datatransfer.c | |
parent | 9adedb26055f03263fefba380980ee2abcb5327e (diff) |
Fix memory leak setting error text in the data-transfer modifier
Diffstat (limited to 'source/blender/modifiers/intern/MOD_datatransfer.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_datatransfer.c | 4 |
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"); |