Browse Source

verify-tag: Clean up the temporary file if gpg cannot be started.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Johannes Sixt 17 years ago committed by Junio C Hamano
parent
commit
69fe5ef6c7
  1. 4
      builtin-verify-tag.c

4
builtin-verify-tag.c

@ -46,8 +46,10 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose) @@ -46,8 +46,10 @@ static int run_gpg_verify(const char *buf, unsigned long size, int verbose)
gpg.argv = args_gpg;
gpg.in = -1;
args_gpg[2] = path;
if (start_command(&gpg))
if (start_command(&gpg)) {
unlink(path);
return error("could not run gpg.");
}

write_in_full(gpg.in, buf, len);
close(gpg.in);

Loading…
Cancel
Save