client: Add missing return statement in error path
authorChristian Eggers <ceggers@arri.de>
Thu, 25 Aug 2022 20:39:03 +0000 (22:39 +0200)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
Client will SEGFAULT if default_ctrl==NULL

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
client/main.c

index 30d944c..dae90ce 100644 (file)
@@ -2521,7 +2521,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)