From fb60f9c16ce8865fbdcd181419f44b72af1aa3c2 Mon Sep 17 00:00:00 2001 From: Ray Smith Date: Tue, 19 Dec 2023 11:43:55 +0000 Subject: [PATCH 1/2] backend-drm: don't leak gem_handle_refcnt in drm_destroy Signed-off-by: Ray Smith --- libweston/backend-drm/drm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c index 8092789..fcececb 100644 --- a/libweston/backend-drm/drm.c +++ b/libweston/backend-drm/drm.c @@ -3364,6 +3364,9 @@ drm_destroy(struct weston_backend *backend) weston_launcher_close(ec->launcher, device->drm.fd); weston_launcher_destroy(ec->launcher); + if (device->gem_handle_refcnt) + hash_table_destroy(device->gem_handle_refcnt); + free(device->drm.filename); free(device); free(b); -- 2.43.0