From 760270832a9d5ada8e942c9a61ff4738b27f5ab4 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 28 Nov 2011 23:31:17 +0100 Subject: [PATCH] adblock_compile_regexp free data after checking it --- extensions/adblock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } -- 2.39.5