[696/906] glapi: fix memory leak from not freeing a string

This commit is contained in:
Matthew Waters 2013-06-11 11:26:38 +10:00
parent 9adc3c8cf3
commit db3c98c688

View file

@ -24,6 +24,7 @@ gchar *
gst_gl_api_string (GstGLAPI api)
{
GString *str = NULL;
gchar *ret;
if (api == GST_GL_API_NONE) {
str = g_string_new ("none");
@ -65,5 +66,7 @@ gst_gl_api_string (GstGLAPI api)
}
}
return str->str;
ret = g_string_free (str, FALSE);
return ret;
}