From fb4f568b1e090c884eb63c3419322b558a38138e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 13 Mar 2018 00:51:39 +0100 Subject: add_handle/easy_perform: clear errorbuffer on start if set To offer applications a more defined behavior, we clear the buffer as early as possible. Assisted-by: Jay Satiro Fixes #2190 Closes #2377 --- lib/multi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/multi.c') 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); -- cgit v1.2.3