mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
gldisplay: Fix context leak when removing a context from the display
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/654>
This commit is contained in:
parent
0fe052db61
commit
a0258e3e6b
1 changed files with 2 additions and 1 deletions
|
@ -906,12 +906,13 @@ gst_gl_display_remove_context (GstGLDisplay * display, GstGLContext * needle)
|
||||||
g_weak_ref_clear (l->data);
|
g_weak_ref_clear (l->data);
|
||||||
g_free (l->data);
|
g_free (l->data);
|
||||||
display->priv->contexts = g_list_delete_link (display->priv->contexts, l);
|
display->priv->contexts = g_list_delete_link (display->priv->contexts, l);
|
||||||
l = prev ? prev->next : display->priv->contexts;
|
|
||||||
if (context) {
|
if (context) {
|
||||||
GST_INFO_OBJECT (display, "removed context %" GST_PTR_FORMAT
|
GST_INFO_OBJECT (display, "removed context %" GST_PTR_FORMAT
|
||||||
" from internal list", context);
|
" from internal list", context);
|
||||||
|
gst_object_unref (context);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
l = prev ? prev->next : display->priv->contexts;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
prev = l;
|
prev = l;
|
||||||
|
|
Loading…
Reference in a new issue