public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] client: Add missing return statement in error path
@ 2022-08-25 20:39 Christian Eggers
  2022-08-25 21:32 ` bluez.test.bot
  2022-08-29 20:10 ` [PATCH] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Christian Eggers @ 2022-08-25 20:39 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Luiz Augusto von Dentz, Christian Eggers

Client will SEGFAULT if default_ctrl==NULL

Fixes: 936ad5ef7b56 ("client: Quit when done with command")
Signed-off-by: Christian Eggers <ceggers@arri.de>
---
 client/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/client/main.c b/client/main.c
index 88c7ad799888..754157b169c6 100644
--- a/client/main.c
+++ b/client/main.c
@@ -2546,7 +2546,7 @@ static void cmd_advertise(int argc, char *argv[])
 
 	if (!default_ctrl || !default_ctrl->ad_proxy) {
 		bt_shell_printf("LEAdvertisingManager not found\n");
-		bt_shell_noninteractive_quit(EXIT_FAILURE);
+		return bt_shell_noninteractive_quit(EXIT_FAILURE);
 	}
 
 	if (enable == TRUE)
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-29 20:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-25 20:39 [PATCH] client: Add missing return statement in error path Christian Eggers
2022-08-25 21:32 ` bluez.test.bot
2022-08-29 20:10 ` [PATCH] " patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox