From: Christian Dywan Date: Mon, 28 Nov 2011 22:31:17 +0000 (+0100) Subject: adblock_compile_regexp free data after checking it X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=760270832a9d5ada8e942c9a61ff4738b27f5ab4;p=midori adblock_compile_regexp free data after checking it --- diff --git a/extensions/adblock.c b/extensions/adblock.c index d41bd851..93e92bb9 100644 --- a/extensions/adblock.c +++ b/extensions/adblock.c @@ -1152,11 +1152,11 @@ adblock_add_url_pattern (gchar* prefix, if (g_regex_match_simple ("subdocument", opts, G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY)) { - g_strfreev (data); if (data[1] && data[2]) g_free (patt); if (data[1]) g_free (opts); + g_strfreev (data); return NULL; } @@ -1165,11 +1165,11 @@ adblock_add_url_pattern (gchar* prefix, adblock_debug ("got: %s opts %s", format_patt->str, opts); should_free = adblock_compile_regexp (format_patt, opts); - g_strfreev (data); if (data[1] && data[2]) g_free (patt); if (data[1]) g_free (opts); + g_strfreev (data); return g_string_free (format_patt, should_free); }