summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2018-03-13 07:38:06 +0100
committerDaniel Stenberg <daniel@haxx.se>2018-03-13 07:38:06 +0100
commitef60a7892558940c13956dedd12675ee9a3b4c64 (patch)
tree1a1316d904e4b03471597fb4167a404e313ca325
parent83f0ebfc6e09ef0c6777b594fecc1a77eb631070 (diff)
downloadcurl-ef60a7892558940c13956dedd12675ee9a3b4c64.tar.gz
fixup the easy_perform errorbuffer clearing
-rw-r--r--lib/easy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/easy.c b/lib/easy.c
index 34c17c6b6..9b69946e0 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -743,13 +743,13 @@ static CURLcode easy_perform(struct Curl_easy *data, bool events)
CURLcode result = CURLE_OK;
SIGPIPE_VARIABLE(pipe_st);
+ if(!data)
+ return CURLE_BAD_FUNCTION_ARGUMENT;
+
if(data->set.errorbuffer)
/* clear this as early as possible */
data->set.errorbuffer[0] = 0;
- if(!data)
- return CURLE_BAD_FUNCTION_ARGUMENT;
-
if(data->multi) {
failf(data, "easy handle already used in multi handle");
return CURLE_FAILED_INIT;