summaryrefslogtreecommitdiff
path: root/lib/multi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-03-13 00:51:39 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-03-17 12:07:37 +0100
commitfb4f568b1e090c884eb63c3419322b558a38138e (patch)
treee58a95e594e2a8f1f49aa8fa8bca913501679db8 /lib/multi.c
parent6baeb6df35d24740c55239f24b5fc4ce86f375a5 (diff)
downloadcurl-fb4f568b1e090c884eb63c3419322b558a38138e.tar.gz
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
Diffstat (limited to 'lib/multi.c')
-rw-r--r--lib/multi.c2
1 files changed, 2 insertions, 0 deletions
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);