[evolution-ews] Reinstate leak fix for GSimpleAsyncResult objects



commit 0e6da7d648a1682633ed9c01d8ac965205f1e779
Author: David Woodhouse <David Woodhouse intel com>
Date:   Tue Aug 16 16:46:17 2011 +0100

    Reinstate leak fix for GSimpleAsyncResult objects
    
    Now that the stray connection unref should be fixed, we can reinstate
    the fix for the leaked GSimpleAsyncResults. A slightly improved version
    over commit 1ac06aa5, this one prevents a possible use-after-free
    because the connection is pinned by the result, so we must do it *in*
    ews_active_job_done() after we've done everything we want to with
    enode->cnc.

 src/server/e-ews-connection.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index c0fe31e..cafc0db 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -329,8 +329,9 @@ ews_active_job_done (EEwsConnection *cnc, EwsNode *ews_node)
 
 	QUEUE_UNLOCK (cnc);
 
-	g_free (ews_node);
 	ews_trigger_next_request(cnc);
+	g_object_unref (ews_node->simple);
+	g_free (ews_node);
 }
 
 static void



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