mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
[696/906] glapi: fix memory leak from not freeing a string
This commit is contained in:
parent
06eb6f4965
commit
f5472457bf
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue