From 62c85a59a9fb3051489b4ecba09651eecea8d968 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Mon, 22 Dec 2025 11:55:34 +0000 Subject: [PATCH] ssh_client: Return non-zero on config parsing failure Signed-off-by: Samir Benmendil Reviewed-by: Jakub Jelen Reviewed-by: Andreas Schneider --- examples/ssh_client.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/examples/ssh_client.c b/examples/ssh_client.c index e6267068..1b516830 100644 --- a/examples/ssh_client.c +++ b/examples/ssh_client.c @@ -355,10 +355,8 @@ static int client(ssh_session session) } /* Parse configuration file if specified: The command-line options will * overwrite items loaded from configuration file */ - if (config_file != NULL) { - ssh_options_parse_config(session, config_file); - } else { - ssh_options_parse_config(session, NULL); + if (ssh_options_parse_config(session, config_file) < 0) { + return -1; } if (ssh_connect(session)) {