summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libssh/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/config.c b/libssh/config.c
index 6bd4e316..1c17b8cc 100644
--- a/libssh/config.c
+++ b/libssh/config.c
@@ -161,6 +161,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
x = s = strdup(line);
if (s == NULL) {
+ ssh_set_error_oom(session);
return -1;
}
@@ -241,6 +242,7 @@ static int ssh_config_parse_line(ssh_session session, const char *line,
b = strdup(p);
if (b == NULL) {
SAFE_FREE(x);
+ ssh_set_error_oom(session);
return -1;
}
i = 0;
@@ -292,7 +294,7 @@ int ssh_config_parse_file(ssh_session session, const char *filename) {
int parsing;
if ((f = fopen(filename, "r")) == NULL) {
- return -1;
+ return 0;
}
if (session->log_verbosity) {