Fix T93523: Memory leak in Menu Search

Fixes a memory leak introduced by D13225.
Caused by not freeing the hash-map in some cases.

Differential Revision: https://developer.blender.org/D13432
This commit is contained in:
Erik
2021-12-09 01:48:11 +01:00
parent be2213472f
commit 3753a0b72b

View File

@@ -45,6 +45,7 @@
#include "DNA_view3d_types.h"
#include "DNA_workspace_types.h"
#include "BLI_ghash.h"
#include "BLI_listbase.h"
#include "BLI_math_vector.h"
#include "BLI_mempool.h"
@@ -671,6 +672,11 @@ void BKE_area_region_free(SpaceType *st, ARegion *region)
region_free_gizmomap_callback(region->gizmo_map);
}
if (region->runtime.block_name_map != NULL) {
BLI_ghash_free(region->runtime.block_name_map, NULL, NULL);
region->runtime.block_name_map = NULL;
}
BLI_freelistN(&region->ui_lists);
BLI_freelistN(&region->ui_previews);
BLI_freelistN(&region->panels_category);