Commit 89122224 authored by Matthew Waters's avatar Matthew Waters 🐨 Committed by Tim-Philipp Müller

glshaderelement: free the vertex and fragment strings on finalize

Fixes a memory leak when using the vertex/fragment properties.
parent 3f8edbee
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment