diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-06-19 13:21:14 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-06-19 13:21:14 +0300 |
commit | e9aaf5ed211d5f71fd2934c8814143c15fd47d5e (patch) | |
tree | 1e56f806d2ad8342f8614ce5509bfb5b444c8033 /source/blender/modifiers/intern/MOD_fluidsim_util.c | |
parent | 72c9141a7a56fa4762ac0daae501f1609532506c (diff) |
Fix (unreported) memory leak in Fluid modifier copying.
Also generally simplify/sanitize this copy code.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_fluidsim_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_fluidsim_util.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c index 2ecf06057db..3684e947fe0 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim_util.c +++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c @@ -150,9 +150,8 @@ void fluidsim_free(FluidsimModifierData *fluidmd) if (fluidmd && fluidmd->fss) { if (fluidmd->fss->meshVelocities) { MEM_freeN(fluidmd->fss->meshVelocities); - fluidmd->fss->meshVelocities = NULL; } - MEM_freeN(fluidmd->fss); + MEM_SAFE_FREE(fluidmd->fss); } return; |