mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
gldisplay: also free the GWeakRef when removing dead contexts
Otherwise we leak GWeakRef's. Found with make -C tests/check libs/gstglcontext.valgrind
This commit is contained in:
parent
cb0f02c78a
commit
7cbac97b94
1 changed files with 1 additions and 0 deletions
|
@ -433,6 +433,7 @@ _get_gl_context_for_thread_unlocked (GstGLDisplay * display, GThread * thread)
|
|||
if (!context) {
|
||||
/* remove dead contexts */
|
||||
g_weak_ref_clear (l->data);
|
||||
g_free (l->data);
|
||||
display->priv->contexts = g_list_delete_link (display->priv->contexts, l);
|
||||
l = prev ? prev->next : display->priv->contexts;
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue