gl/x11: fix memory leak when retrieiving a foreign context's info
authorMatthew Waters <matthew@centricular.com>
Wed, 7 Feb 2024 01:26:04 +0000 (12:26 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 22 Feb 2024 10:24:24 +0000 (10:24 +0000)
The FBConfig's were being leaked.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6160>

subprojects/gst-plugins-base/gst-libs/gst/gl/x11/gstglcontext_glx.c

index 7dd719a6c11f4d2c340b2e96f74b59450589fd3c..6b4a373706b7c406441613219022bc822e1153dd 100644 (file)
@@ -1044,6 +1044,8 @@ gst_gl_context_glx_fill_info (GstGLContext * context, GError ** error)
       GST_GL_CONTEXT_WRAPPED_GL_CONFIG_NAME, config,
       (GDestroyNotify) gst_structure_free);
 
+  XFree (fbconfigs);
+
   return TRUE;
 
 failure: