From: Johannes Sixt Date: Wed, 2 Apr 2008 06:49:59 +0000 (+0200) Subject: verify-tag: Clean up the temporary file if gpg cannot be started. X-Git-Tag: v1.5.5-rc3~9 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/69fe5ef6c7211921a2a7840698bf58a80bab9412?ds=inline;hp=--cc verify-tag: Clean up the temporary file if gpg cannot be started. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- 69fe5ef6c7211921a2a7840698bf58a80bab9412 diff --git a/builtin-verify-tag.c b/builtin-verify-tag.c index f3ef11fa2d..db81496b46 100644 --- a/builtin-verify-tag.c +++ b/builtin-verify-tag.c @@ -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);