From 87af4d594a0610120a5db92d78b14cc39c6757a9 Mon Sep 17 00:00:00 2001 From: htasta Date: Tue, 26 May 2026 21:18:00 +0200 Subject: [PATCH] tool: fixed double closing of file handle bug --- src/tool_operate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tool_operate.c b/src/tool_operate.c index 40fb51fce5..6042ff7b3a 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -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;