mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
vulkandisplay: fix use-after-free with removal of window
g_list_delete_link() free()'s the list node so any access after that is a use-after-free.
This commit is contained in:
parent
e83df1759d
commit
fc9f047885
1 changed files with 3 additions and 2 deletions
|
@ -363,9 +363,10 @@ gst_vulkan_display_remove_window (GstVulkanDisplay * display,
|
|||
GST_OBJECT_LOCK (display);
|
||||
l = _find_window_list_item (display, window);
|
||||
if (l) {
|
||||
GWeakRef *ref = l->data;
|
||||
display->windows = g_list_delete_link (display->windows, l);
|
||||
g_weak_ref_clear (l->data);
|
||||
g_free (l->data);
|
||||
g_weak_ref_clear (ref);
|
||||
g_free (ref);
|
||||
ret = TRUE;
|
||||
}
|
||||
GST_OBJECT_UNLOCK (display);
|
||||
|
|
Loading…
Reference in a new issue