Return-Path: From: Mikel Astiz To: linux-bluetooth@vger.kernel.org Cc: Mikel Astiz Subject: [PATCH obexd v2 1/8] gobex: fix callback remove when canceling transfer Date: Tue, 21 Feb 2012 14:57:05 +0100 Message-Id: <1329832632-3681-2-git-send-email-mikel.astiz.oss@gmail.com> In-Reply-To: <1329832632-3681-1-git-send-email-mikel.astiz.oss@gmail.com> References: <1329832632-3681-1-git-send-email-mikel.astiz.oss@gmail.com> Sender: linux-bluetooth-owner@vger.kernel.org List-ID: From: Mikel Astiz This code path could lead to situations where the callback is later used, making the daemon crash. --- gobex/gobex.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/gobex/gobex.c b/gobex/gobex.c index 0665749..bc76e57 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; } -- 1.7.6.5