[evolution-ews] Bug 722193 - Possible use-after-free in ews_response_cb() after cancel



commit 874ab8bb3b9e4359d08c571e5b5d3e6b72e14b38
Author: Milan Crha <mcrha redhat com>
Date:   Mon Jun 13 12:12:13 2016 +0200

    Bug 722193 - Possible use-after-free in ews_response_cb() after cancel

 src/server/e-ews-connection.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 1a90fc6..d3b5665 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -714,6 +714,7 @@ ews_cancel_request (GCancellable *cancellable,
 
        QUEUE_LOCK (cnc);
        found = g_slist_find (cnc->priv->active_job_queue, node);
+       cnc->priv->jobs = g_slist_remove (cnc->priv->jobs, node);
        QUEUE_UNLOCK (cnc);
 
        g_simple_async_result_set_error (
@@ -724,10 +725,6 @@ ews_cancel_request (GCancellable *cancellable,
        if (found) {
                ews_connection_schedule_cancel_message (cnc, SOUP_MESSAGE (msg));
        } else {
-               QUEUE_LOCK (cnc);
-               cnc->priv->jobs = g_slist_remove (cnc->priv->jobs, (gconstpointer) node);
-               QUEUE_UNLOCK (cnc);
-
                ews_response_cb (cnc->priv->soup_session, SOUP_MESSAGE (msg), node);
        }
 }


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