[evolution-ews] Fix memory leak in update_items call when caller doesn't want ids returned.



commit 0968dfa11b646a94a23de135ae16cfe9e883b751
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed Aug 17 01:00:09 2011 +0100

    Fix memory leak in update_items call when caller doesn't want ids returned.
    
    Should we even *permit* this? For now, this fixes bug 656489

 src/server/e-ews-connection.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index cafc0db..b54dc7f 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -2472,7 +2472,13 @@ e_ews_connection_update_items_finish	(EEwsConnection *cnc,
 		return FALSE;
 	if (ids)
 		*ids = async_data->items;
-
+	else {
+		while (async_data->items) {
+			g_object_unref (async_data->items->data);
+			async_data->items = g_slist_remove (async_data->items,
+							    async_data->items->data);
+		}
+	}
 	return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]