aboutsummaryrefslogtreecommitdiff
path: root/src/tool_operate.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-12-02 12:00:41 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-12-03 16:26:02 +0100
commit7dffc2b46f78e15ac0f8e19a2c8ebeba0c032aa4 (patch)
treea57f27062d3187ed50cc14b04c6aa9944a582806 /src/tool_operate.c
parent0092b6bf8af062a8865c89eaa13704f987716a1c (diff)
curl: show better error message when no homedir is found
Reported-by: Vlastimil Ovčáčík Fixes #4644 Closes #4665
Diffstat (limited to 'src/tool_operate.c')
-rw-r--r--src/tool_operate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 23971f112..ab3a7f1a0 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -1615,7 +1615,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
if(!config->insecure_ok) {
char *home;
char *file;
- result = CURLE_OUT_OF_MEMORY;
+ result = CURLE_FAILED_INIT;
home = homedir();
if(home) {
file = aprintf("%s/.ssh/known_hosts", home);
@@ -1629,6 +1629,9 @@ static CURLcode single_transfer(struct GlobalConfig *global,
}
Curl_safefree(home);
}
+ else {
+ errorf(global, "Failed to figure out user's home dir!");
+ }
if(result)
break;
}