[evolution-data-server/evolution-data-server-3-12] Bug #728087 - Use-after-free in contact address switch in composer
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug #728087 - Use-after-free in contact address switch in composer
- Date: Fri, 18 Apr 2014 17:50:22 +0000 (UTC)
commit 3beee2d9006a1c5975cef5aafaef2aa6849515eb
Author: Christian Schaarschmidt <schaarsc gmx de>
Date: Fri Apr 18 19:41:19 2014 +0200
Bug #728087 - Use-after-free in contact address switch in composer
addressbook/libebook/e-destination.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/addressbook/libebook/e-destination.c b/addressbook/libebook/e-destination.c
index e297e69..0add632 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -566,9 +566,12 @@ e_destination_set_contact (EDestination *dest,
} else if (dest->priv->email_num != email_num) {
/* Splitting here would help the contact lists not rebuiding, so that it remembers ignored
values */
+ /* increase ref counter, because e_destination_clear calls g_object_unref, but we want to
keep the contact */
+ g_object_ref (contact);
+
e_destination_clear (dest);
- dest->priv->contact = e_contact_duplicate (contact);
+ dest->priv->contact = contact;
dest->priv->contact_uid = e_contact_get (dest->priv->contact, E_CONTACT_UID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]