mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2025-12-20 04:40:07 +01:00
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:
parent
9660a4f315
commit
af95899121
1 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue