[gom] gom: Fix a few memory leaks in GomMemoryGroup
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] gom: Fix a few memory leaks in GomMemoryGroup
- Date: Thu, 17 Apr 2014 07:25:05 +0000 (UTC)
commit 41a65604262d82842a6c5f114955de24afa28623
Author: Bastien Nocera <hadess hadess net>
Date: Thu Apr 17 00:33:54 2014 +0200
gom: Fix a few memory leaks in GomMemoryGroup
gom/gom-resource-group.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gom/gom-resource-group.c b/gom/gom-resource-group.c
index b06cad0..a469541 100644
--- a/gom/gom-resource-group.c
+++ b/gom/gom-resource-group.c
@@ -70,6 +70,7 @@ gom_resource_group_set_adapter (GomResourceGroup *group,
g_return_if_fail(GOM_IS_RESOURCE_GROUP(group));
g_return_if_fail(GOM_IS_ADAPTER(adapter));
+ g_clear_object(&group->priv->adapter);
group->priv->adapter = g_object_ref(adapter);
g_object_notify_by_pspec(G_OBJECT(group), gParamSpecs[PROP_ADAPTER]);
}
@@ -436,6 +437,7 @@ gom_resource_group_finalize (GObject *object)
g_clear_object(&priv->adapter);
g_clear_object(&priv->filter);
+ g_clear_pointer(&priv->items, g_hash_table_unref);
G_OBJECT_CLASS(gom_resource_group_parent_class)->finalize(object);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]