[libgdata] contacts: Prevent a double free by correctly copying group names
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata] contacts: Prevent a double free by correctly copying group names
- Date: Sat, 4 Sep 2010 14:36:16 +0000 (UTC)
commit ef1a0fba654f403336d0bca0d81d28dcc9e10ec6
Author: Philip Withnall <philip tecnocode co uk>
Date: Sat Sep 4 15:19:41 2010 +0100
contacts: Prevent a double free by correctly copying group names
gdata/services/contacts/gdata-contacts-contact.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gdata/services/contacts/gdata-contacts-contact.c b/gdata/services/contacts/gdata-contacts-contact.c
index 3cadd3a..b250a18 100644
--- a/gdata/services/contacts/gdata-contacts-contact.c
+++ b/gdata/services/contacts/gdata-contacts-contact.c
@@ -2790,7 +2790,7 @@ gdata_contacts_contact_add_group (GDataContactsContact *self, const gchar *href)
{
g_return_if_fail (GDATA_IS_CONTACTS_CONTACT (self));
g_return_if_fail (href != NULL);
- g_hash_table_insert (self->priv->groups, (gchar*) href, GUINT_TO_POINTER (FALSE));
+ g_hash_table_insert (self->priv->groups, g_strdup (href), GUINT_TO_POINTER (FALSE));
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]