fix [#30220] Knife Tool Leaks memory
both crash and leak are fixed now.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user