sculpt-dev: Fix a couple of memory leaks.

This commit is contained in:
Joseph Eagar 2022-02-24 02:17:58 -08:00
parent a7c944e50d
commit 47f54d332e
2 changed files with 4 additions and 0 deletions

View File

@ -2620,6 +2620,8 @@ ATTR_NO_OPT bool BKE_pbvh_bmesh_update_topology_nodes(PBVH *pbvh,
modified = true;
}
BLI_array_free(nodes);
return modified;
}
@ -3828,6 +3830,7 @@ static void pbvh_bmesh_balance_tree(PBVH *pbvh)
MEM_SAFE_FREE(overlaps);
BLI_array_free(stack);
BLI_array_free(substack);
MEM_SAFE_FREE(depthmap);
}
static void pbvh_bmesh_join_nodes(PBVH *bvh)

View File

@ -65,6 +65,7 @@ void BLI_mm_heap_clear(MinMaxHeap *heap, MinMaxHeapFreeFP ptrfreefp)
}
}
MEM_SAFE_FREE(heap->nodes);
heap->totnode = 0;
}