diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-07-13 19:26:48 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-07-14 16:21:08 +0300 |
commit | 2e8a78f4d1050b5faac34a4b913dfde5778690bc (patch) | |
tree | 22d5b24230e0abe9096524a33e030884a8786ea6 /source | |
parent | 78148e20fa1b983aba71b89cadbf63327a9b09a2 (diff) |
Fluid bake: fix memory leak when path validation fails
Reviewed By: sebbas
Differential Revision: https://developer.blender.org/D8284
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 583c68cb284..26b5f7fb2af 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -546,6 +546,7 @@ static int fluid_bake_exec(struct bContext *C, struct wmOperator *op) return OPERATOR_CANCELLED; } if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } WM_report_banners_cancel(job->bmain); @@ -574,6 +575,7 @@ static int fluid_bake_invoke(struct bContext *C, } if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } @@ -651,6 +653,7 @@ static int fluid_free_exec(struct bContext *C, struct wmOperator *op) job->name = op->type->name; if (!fluid_validatepaths(job, op->reports)) { + fluid_bake_free(job); return OPERATOR_CANCELLED; } |