glsl: free str while returning error
authorVineeth TM <vineeth.tm@samsung.com>
Fri, 13 Nov 2015 01:56:10 +0000 (10:56 +0900)
committerMatthew Waters <matthew@centricular.com>
Fri, 13 Nov 2015 06:00:46 +0000 (17:00 +1100)
https://bugzilla.gnome.org/show_bug.cgi?id=758039

gst-libs/gst/gl/gstglsl.c

index d6cce7a..d9d74a8 100644 (file)
@@ -258,8 +258,10 @@ gst_glsl_version_profile_from_string (const gchar * string,
   /* skip possible #version prefix */
   if (str[0] == '#') {
     if (!(version_s =
-            (gchar *) _check_valid_version_preprocessor_string (version_s)))
+            (gchar *) _check_valid_version_preprocessor_string (version_s))) {
+      g_free (str);
       goto error;
+    }
   }
 
   version_s = g_strstrip (version_s);