From d1b772f1bc05d33f0abbab191872093f91689c40 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Tue, 6 Oct 2009 15:49:47 +0200 Subject: Added more error messages to config parser. --- libssh/config.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) { -- cgit