Message ID | 20220614131549.22054-1-wangyouwan@uniontech.com |
---|---|
State | New |
Headers | show |
Series | obexd: Fix transfer has been free in transfer_abort_response | expand |
diff --git a/gobex/gobex-transfer.c b/gobex/gobex-transfer.c index c94d018b2..48b1f6962 100644 --- a/gobex/gobex-transfer.c +++ b/gobex/gobex-transfer.c @@ -92,7 +92,9 @@ static void transfer_complete(struct transfer *transfer, GError *err) g_obex_drop_tx_queue(transfer->obex); } - transfer->complete_func(transfer->obex, err, transfer->user_data); + if (find_transfer(id) != NULL) + transfer->complete_func(transfer->obex, err, transfer->user_data); + /* Check if the complete_func removed the transfer */ if (find_transfer(id) == NULL) return;