adblock_compile_regexp free data after checking it
This commit is contained in:
parent
ffd3026baf
commit
760270832a
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue