paintable: Properly close DMABuf FD

As g_unix_fd_list_get will dup the FD, we must close it once we are done
with it.
The issue went unnoticable during my testing as apprently, the max
number of open FDs is not in sync between host & toolbox and that is
annoying podman issue...
This commit is contained in:
Bilal Elmoussaoui 2023-05-24 15:17:46 +02:00
parent e8d30c4f73
commit 5736f4e19f

View File

@ -374,6 +374,9 @@ mks_paintable_listener_scanout_dmabuf (MksPaintable *self,
scanout_data->stride = stride;
scanout_data->fourcc = fourcc;
scanout_data->modifier = modifier;
if (self->scanout_data)
g_clear_fd (&self->scanout_data->dmabuf_fd, NULL);
g_clear_pointer (&self->scanout_data, g_free);
self->scanout_data = scanout_data;