diff options
-rw-r--r-- | src/tool_operate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index d4f170e33..61b130672 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -720,8 +720,10 @@ static CURLcode single_transfer(struct GlobalConfig *global, if(SetHTTPrequest(config, HTTPREQ_SIMPLEPOST, &config->httpreq)) result = CURLE_FAILED_INIT; } - if(result) + if(result) { + single_transfer_cleanup(config); return result; + } } if(!state->urlnode) { /* first time caller, setup things */ |