mesa: free idalloc storage for display lists

Fixes a leak:
  ==46154== 48 bytes in 1 blocks are definitely lost in loss record 1,571 of 1,905
  ==46154==    at 0x48466AF: realloc (vg_replace_malloc.c:1437)
  ==46154==    by 0x5FC98EC: util_idalloc_resize (u_idalloc.c:43)
  ==46154==    by 0x5FC9C16: util_idalloc_alloc_range (u_idalloc.c:125)
  ==46154==    by 0x56FDB9F: _mesa_EndList (dlist.c:13681)

Fixes: b703d7c15f ("dlist: store all dlist in a continuous memory block")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14474>
This commit is contained in:
Tapani Pälli 2022-01-10 13:23:31 +02:00 committed by Marge Bot
parent 074bde9989
commit 6e9cd801a6
1 changed files with 1 additions and 0 deletions

View File

@ -362,6 +362,7 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
_mesa_HashDeleteAll(shared->DisplayList, delete_displaylist_cb, ctx);
_mesa_DeleteHashTable(shared->DisplayList);
free(shared->small_dlist_store.ptr);
util_idalloc_fini(&shared->small_dlist_store.free_idx);
}
if (shared->BitmapAtlas) {