[evolution-data-server] 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] Bug #728087 - Use-after-free in contact address switch in composer
- Date: Fri, 18 Apr 2014 17:48:00 +0000 (UTC)
commit a4946488240cff7871a91953579e9a2eeb323def
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 c408655..85d1163 100644
--- a/addressbook/libebook/e-destination.c
+++ b/addressbook/libebook/e-destination.c
@@ -564,9 +564,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]