tool: fixed double closing of file handle bug

This commit is contained in:
htasta 2026-05-26 21:18:00 +02:00
parent c494e9e29d
commit 87af4d594a

View file

@ -855,6 +855,7 @@ static CURLcode post_close_output(struct per_transfer *per,
/* Close the outs file */
if(outs->fopened && outs->stream) {
rc = curlx_fclose(outs->stream);
outs->stream = NULL;
if(!result && rc) {
/* something went wrong in the writing process */
result = CURLE_WRITE_ERROR;