[PATCH 16/17] bluetooth: Fix crash while disconnecting

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

 



From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>

Transport can be NULL in case the device could not be found.
---
 src/modules/bluetooth/backend-ofono.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/bluetooth/backend-ofono.c b/src/modules/bluetooth/backend-ofono.c
index 41810d4..6652825 100644
--- a/src/modules/bluetooth/backend-ofono.c
+++ b/src/modules/bluetooth/backend-ofono.c
@@ -115,7 +115,9 @@ static void hf_audio_card_free(void *data) {
 
     pa_assert(card);
 
-    pa_bluetooth_transport_free(card->transport);
+    if (card->transport)
+        pa_bluetooth_transport_free(card->transport);
+
     pa_xfree(card->path);
     pa_xfree(card->remote);
     pa_xfree(card->local);
-- 
1.9.3



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux