Judge that the obex pointer is not null before OBEX release --- gobex/gobex-transfer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index c94d018b2..77cbeefcf 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -63,8 +63,9 @@ static void transfer_free(struct transfer *transfer) if (transfer->abort_id > 0) g_obex_remove_request_function(transfer->obex, transfer->abort_id); + if (transfer->obex) + g_obex_unref(transfer->obex); - g_obex_unref(transfer->obex); g_free(transfer); } -- 2.20.1