mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-09 19:09:41 +00:00
[696/906] glapi: fix memory leak from not freeing a string
This commit is contained in:
parent
9adc3c8cf3
commit
db3c98c688
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