[evolution/gnome-3-10] Bug #708347 - Memory leak from EWebView/webkit
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-10] Bug #708347 - Memory leak from EWebView/webkit
- Date: Mon, 23 Sep 2013 15:41:07 +0000 (UTC)
commit 462edca861653fd33fd18a94ba975822176e3461
Author: Tomas Popela <tpopela redhat com>
Date: Mon Sep 23 17:38:01 2013 +0200
Bug #708347 - Memory leak from EWebView/webkit
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 b4eb5e4..b60dce3 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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]