tool: do not flush on out-null

Do not flush output when --out-null is set.

Closes #22165
This commit is contained in:
Stefan Eissing 2026-06-25 10:45:02 +02:00 committed by Daniel Stenberg
parent 46e19c8744
commit 7b3316984f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -671,7 +671,7 @@ static CURLcode post_output_handling(struct per_transfer *per,
return CURLE_WRITE_ERROR;
}
if(!outs->regular_file && outs->stream) {
if(!outs->regular_file && outs->stream && !outs->out_null) {
/* Dump standard stream buffered data */
rc = fflush(outs->stream);
if(!result && rc) {