From 68a666b9072fae1f61247f45a36dec20b5f5f569 Mon Sep 17 00:00:00 2001 From: Tomas Popela Date: Wed, 10 Sep 2014 16:24:26 +0200 Subject: EHTMLEditorView - Fix the leaks of the node content inside the process_elements function --- e-util/e-html-editor-view.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c index dde877f6ee..22de2e6f37 100644 --- a/e-util/e-html-editor-view.c +++ b/e-util/e-html-editor-view.c @@ -5727,6 +5727,7 @@ process_elements (EHTMLEditorView *view, g_string_append (buffer, tmp); g_free (tmp); + g_free (content); content = webkit_dom_node_get_text_content (child); g_regex_unref (regex); } @@ -5860,13 +5861,13 @@ process_elements (EHTMLEditorView *view, g_string_append (buffer, tmp); g_free (tmp); - content = webkit_dom_node_get_text_content (child); g_regex_unref (regex); } else if (content && *content) { /* Some it happens that some text is written inside * the tab span element, so save it. */ g_string_append (buffer, content); } + g_free (content); } if (to_html) { element_remove_class ( @@ -6116,11 +6117,8 @@ process_elements (EHTMLEditorView *view, } } - content = webkit_dom_node_get_text_content (node); if (add_br && !skip_nl) g_string_append (buffer, changing_mode ? "
" : "\n"); - - g_free (content); } g_object_unref (nodes); -- cgit v1.2.3