From 45df7c0fe326d6066ae43756065c1549f1c45c43 Mon Sep 17 00:00:00 2001 From: Mikel Astiz Date: Tue, 21 Feb 2012 14:57:05 +0100 Subject: [PATCH] gobex: fix callback remove when canceling transfer This code path could lead to situations where the callback is later used, making the daemon crash. --- gobex/gobex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gobex/gobex.c b/gobex/gobex.c index 066574902..bc76e579c 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -735,6 +735,9 @@ gboolean g_obex_cancel_req(GObex *obex, guint req_id, gboolean remove_callback) goto immediate_completion; } + if (remove_callback) + obex->pending_req->rsp_func = NULL; + return TRUE; } -- 2.47.3