From 03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe Mon Sep 17 00:00:00 2001 From: Hani Benhabiles Date: Fri, 21 Nov 2014 15:24:52 +0100 Subject: [PATCH] Set the correct error in ssh_options_set(). Signed-off-by: Hani Benhabiles Reviewed-by: Andreas Schneider --- src/options.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/options.c b/src/options.c index f7f24553..bf4e680b 100644 --- a/src/options.c +++ b/src/options.c @@ -512,7 +512,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, } session->opts.username = q; } else if (v[0] == '\0') { - ssh_set_error_oom(session); + ssh_set_error_invalid(session); return -1; } else { /* username provided */ session->opts.username = strdup(value); @@ -531,7 +531,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, return -1; } } else if (v[0] == '\0') { - ssh_set_error_oom(session); + ssh_set_error_invalid(session); return -1; } else { session->opts.sshdir = ssh_path_expand_tilde(v);