diff --git a/gst-libs/gst/gl/gstglsl.c b/gst-libs/gst/gl/gstglsl.c index d6cce7a093..d9d74a8e5c 100644 --- a/gst-libs/gst/gl/gstglsl.c +++ b/gst-libs/gst/gl/gstglsl.c @@ -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);