From f464d8c5967abf07e797f3f0d9efb29a4cd2f453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Fri, 22 Jan 2021 15:07:06 +0100 Subject: [PATCH] bluez5: Fix NULL dereference in backend-native Fixes: #602 --- spa/plugins/bluez5/backend-native.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index 1214ffe7e..7ed5ad67a 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -369,6 +369,8 @@ static bool rfcomm_hfp_ag(struct spa_source *source, char* buf) if (rfcomm->transport == NULL) { spa_log_warn(backend->log, NAME": can't create transport: %m"); // TODO: We should manage the missing transport + rfcomm_send_reply(source, "ERROR"); + return true; } rfcomm->transport->codec = selected_codec; spa_bt_device_connect_profile(rfcomm->device, rfcomm->profile);