[evolution/gnome-3-16] EHTMLEditorView - Fix leaks discovered by Valgrind
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-16] EHTMLEditorView - Fix leaks discovered by Valgrind
- Date: Fri, 10 Jul 2015 09:37:06 +0000 (UTC)
commit 61904e0a5a94b9882d8d3a7e14d1850eaad787ff
Author: Tomas Popela <tpopela redhat com>
Date: Fri Jul 10 09:39:14 2015 +0200
EHTMLEditorView - Fix leaks discovered by Valgrind
e-util/e-html-editor-view.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index fceb33f..0d03015 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -3669,7 +3669,7 @@ free_history_event_content (EHTMLEditorViewHistoryEvent *event)
case HISTORY_REMOVE_LINK:
case HISTORY_BLOCKQUOTE:
if (event->data.fragment != NULL)
- g_object_unref (event->data.fragment);
+ g_clear_object (&event->data.fragment);
break;
case HISTORY_FONT_COLOR:
case HISTORY_PASTE:
@@ -3692,9 +3692,9 @@ free_history_event_content (EHTMLEditorViewHistoryEvent *event)
case HISTORY_UNQUOTE:
case HISTORY_LINK_DIALOG:
if (event->data.dom.from != NULL)
- g_object_unref (event->data.dom.from);
+ g_clear_object (&event->data.dom.from);
if (event->data.dom.to != NULL)
- g_object_unref (event->data.dom.to);
+ g_clear_object (&event->data.dom.to);
break;
default:
break;
@@ -9631,6 +9631,12 @@ html_editor_view_load_status_changed (EHTMLEditorView *view)
op->data_free_func (op->data);
g_free (op);
+ while ((op = g_queue_pop_head (view->priv->post_reload_operations))) {
+ if (op->data_free_func)
+ op->data_free_func (op->data);
+ g_free (op);
+ }
+
g_queue_clear (view->priv->post_reload_operations);
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]