aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/easy.c4
-rw-r--r--lib/multi.c2
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c
index fa34c3827..c99758617 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -746,6 +746,10 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events)
if(!data)
return CURLE_BAD_FUNCTION_ARGUMENT;
+ if(data->set.errorbuffer)
+ /* clear this as early as possible */
+ data->set.errorbuffer[0] = 0;
+
if(data->multi) {
failf(data, "easy handle already used in multi handle");
return CURLE_FAILED_INIT;
diff --git a/lib/multi.c b/lib/multi.c
index 0a1dba391..822ac3b1e 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -379,6 +379,8 @@ CURLMcode curl_multi_add_handle(struct Curl_multi *multi,
* potential multi's connection cache growing which won't be undone in this
* function no matter what.
*/
+ if(data->set.errorbuffer)
+ data->set.errorbuffer[0] = 0;
/* set the easy handle */
multistate(data, CURLM_STATE_INIT);