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
parent
7900edcf76
commit
ba27cdc45e
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue