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
@ -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…
x
Reference in New Issue
Block a user