aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomas Popela <tpopela@redhat.com>2014-09-10 22:24:26 +0800
committerTomas Popela <tpopela@redhat.com>2014-09-10 22:26:04 +0800
commit68a666b9072fae1f61247f45a36dec20b5f5f569 (patch)
treede093a4f0fa8a38b91e4f75a45eb64fbe1552bc0
parente0dc225662f4946d16814fcea488026eb1292eef (diff)
downloadgsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar.gz
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar.bz2
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar.lz
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar.xz
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.tar.zst
gsoc2013-evolution-68a666b9072fae1f61247f45a36dec20b5f5f569.zip
EHTMLEditorView - Fix the leaks of the node content inside the process_elements function
-rw-r--r--e-util/e-html-editor-view.c6
1 files 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 ? "<br>" : "\n");
-
- g_free (content);
}
g_object_unref (nodes);