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>2012-02-17 09:33:23 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-02-17 09:33:23 +0400
commit02987fd5e1fa3715d25bb7b9bd659fd509f40c57 (patch)
tree0c03dced8c9239d3589fad9e129542981dcac262
parent8a2bf0ba5498db16e11307fd2699815fb3b1cd3b (diff)
fix [#30220] Knife Tool Leaks memory
both crash and leak are fixed now.
-rw-r--r--source/blender/blenlib/intern/smallhash.c2
-rwxr-xr-xsource/blender/editors/mesh/knifetool.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index aaa518d3e1c..fb03849bfb3 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -88,7 +88,7 @@ void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item)
int i = 0;
if (hash->table != hash->stacktable || newsize > SMSTACKSIZE) {
- tmp = MEM_callocN(sizeof(*hash->table) * newsize, "new hashkeys");
+ tmp = MEM_callocN(sizeof(*hash->table) * newsize, __func__);
}
else {
SWAP(SmallHashEntry *, hash->stacktable, hash->copytable);
diff --git a/source/blender/editors/mesh/knifetool.c b/source/blender/editors/mesh/knifetool.c
index 257c23cc0db..8e56a357487 100755
--- a/source/blender/editors/mesh/knifetool.c
+++ b/source/blender/editors/mesh/knifetool.c
@@ -1680,6 +1680,8 @@ static void remerge_faces(knifetool_opdata *kcd)
/* bm->elem_index_dirty &= ~BM_FACE; */
bm->elem_index_dirty |= BM_FACE;
+ BLI_smallhash_release(visit);
+
BLI_array_free(stack);
BLI_array_free(faces);
}