diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-30 17:40:24 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-30 17:40:24 +0300 |
commit | bde80cbb14133c6feb55d0ec1e26cf87b6dcb378 (patch) | |
tree | 9be5c1675a8f089d4a015cd7e5e242a4e835ee59 /source/blender/modifiers | |
parent | 74c7707e8c763a60c2936e95c2f0ad13dfd33f43 (diff) |
Fix memory leak in hook modifier's data copy
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_hook.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c index 1a27202fb34..e175f4943a7 100644 --- a/source/blender/modifiers/intern/MOD_hook.c +++ b/source/blender/modifiers/intern/MOD_hook.c @@ -67,6 +67,13 @@ static void copyData(ModifierData *md, ModifierData *target) HookModifierData *hmd = (HookModifierData *) md; HookModifierData *thmd = (HookModifierData *) target; + if (thmd->curfalloff != NULL) { + curvemapping_free(thmd->curfalloff); + } + if (thmd->indexar != NULL) { + MEM_freeN(thmd->indexar); + } + modifier_copyData_generic(md, target); thmd->curfalloff = curvemapping_copy(hmd->curfalloff); |