glshaderelement: free the vertex and fragment strings on finalize

Fixes a memory leak when using the vertex/fragment properties.
This commit is contained in:
Matthew Waters 2015-10-21 05:34:18 +11:00 committed by Tim-Philipp Müller
parent 3f8edbee03
commit 89122224eb

View file

@ -164,6 +164,14 @@ gst_gl_filtershader_finalize (GObject * object)
{
GstGLFilterShader *filtershader = GST_GL_FILTERSHADER (object);
if (filtershader->vertex)
g_free (filtershader->vertex);
filtershader->vertex = NULL;
if (filtershader->fragment)
g_free (filtershader->fragment);
filtershader->fragment = NULL;
if (filtershader->uniforms)
gst_structure_free (filtershader->uniforms);
filtershader->uniforms = NULL;