mirror of
https://github.com/git/git.git
synced 2026-08-05 07:31:02 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
bd58327406
commit
a62c2a26fc
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user