download_https_uri_to_file(): do not leak fd upon failure

When the `git-remote-https` command fails, we do not want to leak
`child_out`.

Pointed out by Coverity.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
seen
Johannes Schindelin 2026-07-01 07:04:21 +00:00 committed by Junio C Hamano
parent 7900edcf76
commit ba27cdc45e
1 changed files with 1 additions and 1 deletions

View File

@ -378,7 +378,7 @@ cleanup:
if (child_in)
fclose(child_in);
if (finish_command(&cp))
return 1;
result = 1;
if (child_out)
fclose(child_out);
return result;