summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 64c647be2..34c17c6b6 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -743,6 +743,10 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events)
CURLcode result = CURLE_OK;
SIGPIPE_VARIABLE(pipe_st);
+ if(data->set.errorbuffer)
+ /* clear this as early as possible */
+ data->set.errorbuffer[0] = 0;
+
if(!data)
return CURLE_BAD_FUNCTION_ARGUMENT;
diff --git a/lib/multi.c b/lib/multi.c
index 98e5fca2a..671f4597e 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -378,6 +378,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);