glslstage: Fix vertex_sources memory leak
authorVineeth TM <vineeth.tm@samsung.com>
Thu, 12 Nov 2015 07:36:03 +0000 (16:36 +0900)
committerMatthew Waters <matthew@centricular.com>
Thu, 12 Nov 2015 10:23:21 +0000 (21:23 +1100)
vertex_sources is being allocated but not freed resulting in leak

https://bugzilla.gnome.org/show_bug.cgi?id=757974

gst-libs/gst/gl/gstglslstage.c

index 1eb99ce..05fde10 100644 (file)
@@ -452,6 +452,7 @@ _compile_shader (GstGLContext * context, struct compile *data)
   gl->ShaderSource (priv->handle, n_vertex_sources,
       (const gchar **) vertex_sources, NULL);
   gl->CompileShader (priv->handle);
+  g_free (vertex_sources);
   /* FIXME: supported threaded GLSL compilers and don't destroy compilation
    * performance by getting the compilation result directly after compilation */
   status = GL_FALSE;