From 6e9cd801a65cdb2cefa3b3f261a93250e0267480 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Mon, 10 Jan 2022 13:23:31 +0200 Subject: [PATCH] mesa: free idalloc storage for display lists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: b703d7c15f4 ("dlist: store all dlist in a continuous memory block") Signed-off-by: Tapani Pälli Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/shared.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c index 25e24da63e9..48621b37c82 100644 --- a/src/mesa/main/shared.c +++ b/src/mesa/main/shared.c @@ -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) {