tool_operate: fclose stream only if fopened
Fixes torture test failures
Follow-up to cc71d35265
Closes #7972
This commit is contained in:
parent
ef7c76ad82
commit
9e9fef9e24
@ -881,7 +881,7 @@ static CURLcode single_transfer(struct GlobalConfig *global,
|
||||
result = add_per_transfer(&per);
|
||||
if(result || !curl) {
|
||||
curl_easy_cleanup(curl);
|
||||
if(etag_save->stream)
|
||||
if(etag_save->fopened)
|
||||
fclose(etag_save->stream);
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
break;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user