diff options
author | Daniel Stenberg <daniel@haxx.se> | 2018-03-13 00:51:39 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2018-03-17 12:07:37 +0100 |
commit | fb4f568b1e090c884eb63c3419322b558a38138e (patch) | |
tree | e58a95e594e2a8f1f49aa8fa8bca913501679db8 /lib/easy.c | |
parent | 6baeb6df35d24740c55239f24b5fc4ce86f375a5 (diff) | |
download | curl-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/easy.c')
-rw-r--r-- | lib/easy.c | 4 |
1 files changed, 4 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; |