Fix (unreported) memleak in Warp modifier copying.
authorBastien Montagne <montagne29@wanadoo.fr>
Fri, 5 May 2017 08:36:23 +0000 (10:36 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Fri, 5 May 2017 08:36:23 +0000 (10:36 +0200)
source/blender/modifiers/intern/MOD_warp.c

index 92d44257d03f2ceda352b978b408eb2d8eda0ea0..b340356467a98bc59c749071e7be4419097151be 100644 (file)
@@ -66,6 +66,10 @@ static void copyData(ModifierData *md, ModifierData *target)
        WarpModifierData *wmd = (WarpModifierData *) md;
        WarpModifierData *twmd = (WarpModifierData *) target;
 
+       if (twmd->curfalloff != NULL) {
+               curvemapping_free(twmd->curfalloff);
+       }
+
        modifier_copyData_generic(md, target);
 
        twmd->curfalloff = curvemapping_copy(wmd->curfalloff);