Need to consider the case where err is not released --- gobex/gobex.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gobex/gobex.c b/gobex/gobex.c index e9b89cead..bc4d52551 100644 --- a/gobex/gobex.c +++ b/gobex/gobex.c @@ -1140,8 +1140,12 @@ static void handle_response(GObex *obex, GError *err, GObexPacket *rsp) p->rsp_func(obex, err, rsp, p->rsp_data); /* Check if user callback removed the request */ - if (!final_rsp && p != obex->pending_req) + if (!final_rsp && p != obex->pending_req) { + if (p->cancelled) + g_error_free(err); + return; + } } if (p->cancelled) -- 2.20.1