From: Vineeth TM Date: Thu, 12 Nov 2015 07:18:35 +0000 (+0900) Subject: glcolorconvert: Fix string leak X-Git-Tag: 1.19.3~507^2~7594 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ba4802e1e57364975f09f471735d409c2b89fc73;p=platform%2Fupstream%2Fgstreamer.git glcolorconvert: Fix string leak String got using gst_glsl_version_profile_to_string, is allocated memory and should be freed https://bugzilla.gnome.org/show_bug.cgi?id=757974 --- diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index ef44827..4eb3ac5 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -1582,7 +1582,7 @@ _create_shader (GstGLColorConvert * convert) GstGLSLStage *stage; GstGLSLVersion version; GstGLSLProfile profile; - gchar *version_str, *tmp; + gchar *version_str, *tmp, *tmp1; const gchar *strings[2]; GError *error = NULL; GstGLAPI gl_api; @@ -1596,8 +1596,9 @@ _create_shader (GstGLColorConvert * convert) _mangle_shader (text_vertex_shader, GL_VERTEX_SHADER, info->templ->target, convert->priv->from_texture_target, gl_api, &version, &profile); - version_str = g_strdup_printf ("#version %s\n", - gst_glsl_version_profile_to_string (version, profile)); + tmp1 = gst_glsl_version_profile_to_string (version, profile); + version_str = g_strdup_printf ("#version %s\n", tmp1); + g_free (tmp1); strings[0] = version_str; strings[1] = tmp;