mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 04:00:37 +00:00
vkutils: do not forget to clear context in case of error
The context is leaking in case of a failing instance open. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6975>
This commit is contained in:
parent
c3f3fd7351
commit
7bbf5fd801
1 changed files with 1 additions and 0 deletions
|
@ -271,6 +271,7 @@ gst_vulkan_ensure_element_data (GstElement * element,
|
|||
if (!gst_vulkan_instance_open (*instance_ptr, &error)) {
|
||||
GST_ELEMENT_ERROR (element, RESOURCE, NOT_FOUND,
|
||||
("Failed to create vulkan instance"), ("%s", error->message));
|
||||
gst_clear_context (&context);
|
||||
gst_object_unref (*instance_ptr);
|
||||
*instance_ptr = NULL;
|
||||
g_clear_error (&error);
|
||||
|
|
Loading…
Reference in a new issue