diff options
Diffstat (limited to 'e-util')
-rw-r--r-- | e-util/e-web-view.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c index b4eb5e4d40..b60dce3128 100644 --- a/e-util/e-web-view.c +++ b/e-util/e-web-view.c @@ -3351,7 +3351,7 @@ add_css_rule_into_style_sheet (WebKitDOMDocument *document, /* Check if rule exists */ for (ii = 0; ii < length; ii++) { WebKitDOMCSSRule *rule; - const gchar *rule_text; + gchar *rule_text; gchar *rule_selector, *selector_end; rule = webkit_dom_css_rule_list_item (rules_list, ii); @@ -3363,8 +3363,10 @@ add_css_rule_into_style_sheet (WebKitDOMDocument *document, /* Find the start of the style => end of the selector */ selector_end = g_strstr_len (rule_text, -1, " {"); - if (!selector_end) + if (!selector_end) { + g_free (rule_text); continue; + } rule_selector = g_utf8_substring ( @@ -3380,6 +3382,7 @@ add_css_rule_into_style_sheet (WebKitDOMDocument *document, } g_free (rule_selector); + g_free (rule_text); } /* Insert the rule at the end, so it will override previously inserted */ |