diff options
author | Hani Benhabiles <kroosec@gmail.com> | 2014-11-21 15:24:52 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2014-12-05 11:03:55 +0100 |
commit | 03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe (patch) | |
tree | 997b69d63fc600ed5764f421b7af884d32513fbd /src | |
parent | 6895d0b7272f10efba8473b41a43738e1530c7c8 (diff) | |
download | libssh-03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe.tar.gz libssh-03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe.tar.xz libssh-03095f1516b7f5b8b0d55f05fa9a39bae68ee8fe.zip |
Set the correct error in ssh_options_set().
Signed-off-by: Hani Benhabiles <hani@linux.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/options.c | 4 |
1 files 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); |