mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
vulkan: Don't leak fds
It makes sense to close the fds before doing an early return. D'oh.
This commit is contained in:
parent
059af1365a
commit
809b98c96e
@ -189,14 +189,15 @@ gsk_vulkan_frame_upload_texture (GskGpuFrame *frame,
|
|||||||
gdk_texture_get_height (texture),
|
gdk_texture_get_height (texture),
|
||||||
&dmabuf,
|
&dmabuf,
|
||||||
gdk_memory_format_alpha (gdk_texture_get_format (texture)) == GDK_MEMORY_ALPHA_PREMULTIPLIED);
|
gdk_memory_format_alpha (gdk_texture_get_format (texture)) == GDK_MEMORY_ALPHA_PREMULTIPLIED);
|
||||||
|
|
||||||
|
/* Vulkan import dups the fds, so we can close these */
|
||||||
|
gdk_dmabuf_close_fds (&dmabuf);
|
||||||
|
|
||||||
if (image)
|
if (image)
|
||||||
{
|
{
|
||||||
gsk_gpu_image_toggle_ref_texture (image, texture);
|
gsk_gpu_image_toggle_ref_texture (image, texture);
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Vulkan import dups the fds, so we can close these */
|
|
||||||
gdk_dmabuf_close_fds (&dmabuf);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user