[Bf-blender-cvs] [2e8a78f4d10] master: Fluid bake: fix memory leak when path validation fails

Kévin Dietrich noreply at git.blender.org
Tue Jul 14 15:22:45 CEST 2020


Commit: 2e8a78f4d1050b5faac34a4b913dfde5778690bc
Author: Kévin Dietrich
Date:   Mon Jul 13 18:26:48 2020 +0200
Branches: master
https://developer.blender.org/rB2e8a78f4d1050b5faac34a4b913dfde5778690bc

Fluid bake: fix memory leak when path validation fails

Reviewed By: sebbas

Differential Revision: https://developer.blender.org/D8284

===================================================================

M	source/blender/editors/physics/physics_fluid.c

===================================================================

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;
   }



More information about the Bf-blender-cvs mailing list