]> spindle.queued.net Git - midori/commitdiff
Free uri in adblock_is_matched_by_key after printing
authorPaweł Forysiuk <tuxator@o2.pl>
Sun, 13 Feb 2011 16:52:37 +0000 (17:52 +0100)
committerChristian Dywan <christian@twotoasts.de>
Sun, 13 Feb 2011 17:35:46 +0000 (18:35 +0100)
extensions/adblock.c

index ff08b672daadd7e9a763aaf8ff31b21300b46c4b..00055b2c8c0296b1e0bd581db4df702db6856794 100644 (file)
@@ -654,16 +654,17 @@ adblock_is_matched_by_key (const gchar*  opts,
         {
             if (g_regex_match_full (regex, req_uri, -1, 0, 0, NULL, NULL))
             {
-                g_free (uri);
                 g_free (sig);
                 if (opts && adblock_check_filter_options (regex, opts, req_uri, page_uri))
                 {
+                    g_free (uri);
                     g_list_free (regex_bl);
                     return FALSE;
                 }
                 else
                 {
                     adblock_debug ("blocked by regexp=%s -- %s", g_regex_get_pattern (regex), uri);
+                    g_free (uri);
                     g_list_free (regex_bl);
                     return TRUE;
                 }