[PATCH] obexd: Fix obex pointer is not null judgment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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..626a08e38 100644
--- a/gobex/gobex-transfer.c
+++ b/gobex/gobex-transfer.c
@@ -64,7 +64,8 @@ static void transfer_free(struct transfer *transfer)
 		g_obex_remove_request_function(transfer->obex,
 							transfer->abort_id);
 
-	g_obex_unref(transfer->obex);
+    if (transfer->obex)
+		g_obex_unref(transfer->obex);
 	g_free(transfer);
 }
 
-- 
2.20.1






[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux