[evolution-data-server/gnome-3-4] Avoid possible use-after-free in Google's addressbook backend
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-4] Avoid possible use-after-free in Google's addressbook backend
- Date: Tue, 27 Mar 2012 08:45:29 +0000 (UTC)
commit 6f6f4153ee172dafd83c02c91fd790022d79be91
Author: Milan Crha <mcrha redhat com>
Date: Tue Mar 27 10:45:02 2012 +0200
Avoid possible use-after-free in Google's addressbook backend
.../backends/google/e-book-backend-google.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/backends/google/e-book-backend-google.c b/addressbook/backends/google/e-book-backend-google.c
index bc6234d..37fbd04 100644
--- a/addressbook/backends/google/e-book-backend-google.c
+++ b/addressbook/backends/google/e-book-backend-google.c
@@ -3248,12 +3248,13 @@ _e_contact_new_from_gdata_entry (EBookBackend *backend,
category_id = sanitise_group_id (itr->data);
category_name = g_hash_table_lookup (priv->groups_by_id, category_id);
- g_free (category_id);
if (category_name != NULL)
category_names = g_list_prepend (category_names, category_name);
else
g_warning ("Couldn't find name for category with ID '%s'.", category_id);
+
+ g_free (category_id);
}
e_contact_set (E_CONTACT (vcard), E_CONTACT_CATEGORY_LIST, category_names);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]