gl-renderer: close gbm device fd on destroy

Trivial fix to get a clean valgrind fd report with gl-renderer.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
This commit is contained in:
Erico Nunes 2025-02-28 14:46:49 +01:00 committed by Michael Tretter
parent 9660a4f315
commit af95899121

View file

@ -4436,8 +4436,11 @@ gl_renderer_allocator_destroy(struct dmabuf_allocator *allocator)
return;
#ifdef HAVE_GBM
if (allocator->gbm_device && allocator->has_own_device)
if (allocator->gbm_device && allocator->has_own_device) {
int fd = gbm_device_get_fd(allocator->gbm_device);
gbm_device_destroy(allocator->gbm_device);
close(fd);
}
#else
assert(!allocator->has_own_device);