Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2021-08-20 08:57:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-08-20 09:00:12 +0300
commit9e2cd6b07784e58f0e9b2ad6800f3ca8b54f9745 (patch)
tree02305a7668a716e1194fd0eb1be8ed56f4fc7d40
parenta48df97ada85960de4fd0eeba61b32e260bf378c (diff)
Fix memory leak with building springs in the cloth simulator
Error in 2788b0261cb7d33a2f6f2978ff4f55bb4987edae.
-rw-r--r--source/blender/blenkernel/intern/cloth.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c
index 9aa2d017c48..080a7c90c46 100644
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@ -42,6 +42,7 @@
#include "BKE_cloth.h"
#include "BKE_effect.h"
#include "BKE_global.h"
+#include "BKE_lib_id.h"
#include "BKE_mesh.h"
#include "BKE_mesh_runtime.h"
#include "BKE_modifier.h"
@@ -1574,7 +1575,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
BLI_edgeset_free(existing_vert_pairs);
free_bvhtree_from_mesh(&treedata);
if (tmp_mesh) {
- BKE_mesh_free_data(tmp_mesh);
+ BKE_id_free(NULL, &tmp_mesh->id);
}
return false;
}
@@ -1583,7 +1584,7 @@ static bool cloth_build_springs(ClothModifierData *clmd, Mesh *mesh)
BLI_edgeset_free(existing_vert_pairs);
free_bvhtree_from_mesh(&treedata);
if (tmp_mesh) {
- BKE_mesh_free_data(tmp_mesh);
+ BKE_id_free(NULL, &tmp_mesh->id);
}
BLI_rng_free(rng);
}
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 564a3c526f4..e6b1012c981 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -1649,6 +1649,7 @@ static int lineart_edge_type_duplication_count(char eflag)
}
static void lineart_geometry_object_load(LineartObjectInfo *obi, LineartRenderBuffer *rb)
{
+ printf("========================================================\nTESTING\n");
BMesh *bm;
BMVert *v;
BMFace *f;