[evolution] Bug #708347 - Memory leak from EWebView/webkit



commit 1331699f4fe35637bf347231960d129509e17db0
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]