Mesa (main): mesa: free idalloc storage for display lists

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jan 11 06:38:34 UTC 2022


Module: Mesa
Branch: main
Commit: 6e9cd801a65cdb2cefa3b3f261a93250e0267480
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6e9cd801a65cdb2cefa3b3f261a93250e0267480

Author: Tapani Pälli <tapani.palli at intel.com>
Date:   Mon Jan 10 13:23:31 2022 +0200

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: b703d7c15f4 ("dlist: store all dlist in a continuous memory block")
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14474>

---

 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) {



More information about the mesa-commit mailing list