All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] verify-tag: Clean up the temporary file if gpg cannot be started.
@ 2008-04-02  6:49 Johannes Sixt
  0 siblings, 0 replies; only message in thread
From: Johannes Sixt @ 2008-04-02  6:49 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

From: Johannes Sixt <johannes.sixt@telecom.at>

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
---
 builtin-verify-tag.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/builtin-verify-tag.c b/builtin-verify-tag.c
index f3ef11f..db81496 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);
-- 
1.5.5.rc2.861.g18c5b.dirty

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-02  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-02  6:49 [PATCH] verify-tag: Clean up the temporary file if gpg cannot be started Johannes Sixt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.