projects
/
platform
/
upstream
/
gst-plugins-base.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb0f02c
)
gldisplay: also free the GWeakRef when removing dead contexts
author
Matthew Waters
<matthew@centricular.com>
Thu, 22 Sep 2016 08:19:36 +0000
(18:19 +1000)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 9 Dec 2017 19:32:22 +0000
(19:32 +0000)
Otherwise we leak GWeakRef's.
Found with make -C tests/check libs/gstglcontext.valgrind
gst-libs/gst/gl/gstgldisplay.c
patch
|
blob
|
history
diff --git
a/gst-libs/gst/gl/gstgldisplay.c
b/gst-libs/gst/gl/gstgldisplay.c
index
7cb6266
..
3ffc906
100644
(file)
--- a/
gst-libs/gst/gl/gstgldisplay.c
+++ b/
gst-libs/gst/gl/gstgldisplay.c
@@
-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;