aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-12 19:12:51 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-09-12 20:15:02 +0800
commit616f55e491686779b760b0726f237f13f36ccdbb (patch)
treefb9c333d0846bab0b56692664d4b10e2480bd721
parent6fbef3adb95ac8bd28ea1f7a81b40a06f993e061 (diff)
downloadgsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar.gz
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar.bz2
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar.lz
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar.xz
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.tar.zst
gsoc2013-empathy-616f55e491686779b760b0726f237f13f36ccdbb.zip
empathy_roster_model_get_groups_for_individual: return a (transfer full) list
gee_iterator_get() returns a new string, so we have to pass its ownership to the list to not leak it. https://bugzilla.gnome.org/show_bug.cgi?id=683864
-rw-r--r--libempathy-gtk/empathy-roster-model-manager.c4
-rw-r--r--libempathy-gtk/empathy-roster-model.c2
-rw-r--r--libempathy-gtk/empathy-roster-view.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/libempathy-gtk/empathy-roster-model-manager.c b/libempathy-gtk/empathy-roster-model-manager.c
index 74789c7a5..3738c7fcd 100644
--- a/libempathy-gtk/empathy-roster-model-manager.c
+++ b/libempathy-gtk/empathy-roster-model-manager.c
@@ -373,14 +373,14 @@ empathy_roster_model_manager_get_groups_for_individual (
if (is_xmpp_local_contact (individual))
{
groups_list = g_list_prepend (groups_list,
- EMPATHY_ROSTER_MODEL_GROUP_PEOPLE_NEARBY);
+ g_strdup (EMPATHY_ROSTER_MODEL_GROUP_PEOPLE_NEARBY));
return groups_list;
}
if (individual_in_top_group_members (EMPATHY_ROSTER_MODEL_MANAGER (model),
individual))
groups_list = g_list_prepend (groups_list,
- EMPATHY_ROSTER_MODEL_GROUP_TOP_GROUP);
+ g_strdup (EMPATHY_ROSTER_MODEL_GROUP_TOP_GROUP));
groups_set = folks_group_details_get_groups (
FOLKS_GROUP_DETAILS (individual));
diff --git a/libempathy-gtk/empathy-roster-model.c b/libempathy-gtk/empathy-roster-model.c
index 269aba243..a7f094e3f 100644
--- a/libempathy-gtk/empathy-roster-model.c
+++ b/libempathy-gtk/empathy-roster-model.c
@@ -119,7 +119,7 @@ empathy_roster_model_get_individuals (EmpathyRosterModel *self)
*
* Returns the groups of which @individual is a member of.
*
- * Returns: (transfer container): a #GList of (const gchar *) representing the
+ * Returns: (transfer full): a #GList of (gchar *) representing the
* groups of @individual
*/
GList *
diff --git a/libempathy-gtk/empathy-roster-view.c b/libempathy-gtk/empathy-roster-view.c
index d1e1c7891..b5f2ccd07 100644
--- a/libempathy-gtk/empathy-roster-view.c
+++ b/libempathy-gtk/empathy-roster-view.c
@@ -409,7 +409,7 @@ individual_added (EmpathyRosterView *self,
add_to_group (self, individual, EMPATHY_ROSTER_MODEL_GROUP_UNGROUPED);
}
- g_list_free (groups);
+ g_list_free_full (groups, g_free);
}
tp_g_signal_connect_object (individual, "notify::is-favourite",
@@ -595,7 +595,7 @@ contact_in_top (EmpathyRosterView *self,
(GCompareFunc) g_strcmp0) != NULL)
result = TRUE;
- g_list_free (groups);
+ g_list_free_full (groups, g_free);
return result;
}