summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Waters <ystreet00@gmail.com>2013-06-11 11:26:38 +1000
committerMatthew Waters <ystreet00@gmail.com>2014-03-15 18:36:55 +0100
commitdb3c98c688f69bea1838a0a9ffc612704b551993 (patch)
tree94c645683ac4ba1de66b67307162682cc6dd2da7
parent9adc3c8cf3c93836dd0fb9580fcd095733e52f4b (diff)
downloadgstreamer-plugins-bad-db3c98c688f69bea1838a0a9ffc612704b551993.tar.gz
[696/906] glapi: fix memory leak from not freeing a string
-rw-r--r--gst-libs/gst/gl/gstglapi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gst-libs/gst/gl/gstglapi.c b/gst-libs/gst/gl/gstglapi.c
index 989ee9b59..8a42b903a 100644
--- a/gst-libs/gst/gl/gstglapi.c
+++ b/gst-libs/gst/gl/gstglapi.c
@@ -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;
}