From 48fb96027498d169bc1246221eae15578d2599bc Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Fri, 7 Feb 2025 13:14:59 +0200 Subject: [PATCH] bluez5: backend-native: fix erroneous goto In this error condition, execution is supposed to return immediately because rfcomm is no longer valid. However, the code was incorrectly changed to jump to the done label, which would try to use rfcomm again to process pending commands. --- spa/plugins/bluez5/backend-native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index 5efde6a86..3ed54c838 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -1309,7 +1309,7 @@ static bool hfp_hf_wait_for_reply(struct rfcomm *rfcomm, char *buf, size_t len) if (fds[0].revents & (POLLHUP | POLLERR)) { spa_log_info(backend->log, "lost RFCOMM connection."); rfcomm_free(rfcomm); - goto done; + return false; } if (fds[0].revents & POLLIN) {