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

Luiz Augusto von Dentz luiz.dentz at gmail.com
Fri Aug 22 07:05:01 PDT 2014


From: Luiz Augusto von Dentz <luiz.von.dentz at intel.com>

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



More information about the pulseaudio-discuss mailing list