[evolution] Fix two little memory leaks
- From: Dan VrÃtil <dvratil src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Fix two little memory leaks
- Date: Fri, 30 Sep 2011 23:03:26 +0000 (UTC)
commit d58d259aa0cfb513ea165cedd558561890656d65
Author: Dan VrÃtil <dvratil redhat com>
Date: Sat Oct 1 01:02:13 2011 +0200
Fix two little memory leaks
e-util/e-plugin-ui.c | 3 ++-
widgets/table/e-tree.c | 5 +++++
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-plugin-ui.c b/e-util/e-plugin-ui.c
index 745a931..3ac9eb9 100644
--- a/e-util/e-plugin-ui.c
+++ b/e-util/e-plugin-ui.c
@@ -522,7 +522,8 @@ e_plugin_ui_hook_init (EPluginUIHook *hook)
(GDestroyNotify) g_free,
(GDestroyNotify) g_free);
- registry = g_hash_table_new (g_direct_hash, g_direct_equal);
+ registry = g_hash_table_new_full (g_direct_hash, g_direct_equal,
+ NULL, (GDestroyNotify) g_hash_table_destroy);
hook->priv = G_TYPE_INSTANCE_GET_PRIVATE (
hook, E_TYPE_PLUGIN_UI_HOOK, EPluginUIHookPrivate);
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 4181865..effd1e9 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -472,6 +472,11 @@ et_dispose (GObject *object)
priv->table_canvas = NULL;
}
+ if (priv->item != NULL) {
+ g_object_unref (G_OBJECT (priv->item));
+ priv->item = NULL;
+ }
+
/* Chain up to parent's dispose() method. */
G_OBJECT_CLASS (e_tree_parent_class)->dispose (object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]