[evolution-data-server] Bug #628485 - Accessing freed memory in EContactStore::dispose
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #628485 - Accessing freed memory in EContactStore::dispose
- Date: Wed, 1 Sep 2010 13:13:09 +0000 (UTC)
commit ded32d92d7db5fc85f3276462edae4c00547fad4
Author: Milan Crha <mcrha redhat com>
Date: Wed Sep 1 15:12:15 2010 +0200
Bug #628485 - Accessing freed memory in EContactStore::dispose
libedataserverui/e-contact-store.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libedataserverui/e-contact-store.c b/libedataserverui/e-contact-store.c
index 21fd677..de98248 100644
--- a/libedataserverui/e-contact-store.c
+++ b/libedataserverui/e-contact-store.c
@@ -112,8 +112,9 @@ contact_store_dispose (GObject *object)
for (ii = 0; ii < priv->contact_sources->len; ii++) {
ContactSource *source;
+ /* clear from back, because clear_contact_source can later access freed memory */
source = &g_array_index (
- priv->contact_sources, ContactSource, ii);
+ priv->contact_sources, ContactSource, priv->contact_sources->len - ii - 1);
clear_contact_source (E_CONTACT_STORE (object), source);
free_contact_ptrarray (source->contacts);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]