git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Apr 2, 2008, 06:49 UTC
Message-ID
<47F32C97.6050007@viscovery.net>
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
Message 1 of 1 in “verify-tag: Clean up the temporary file if gpg cannot be started.”
  1. verify-tag: Clean up the temporary file if gpg cannot be started.Johannes Sixt, Apr 2, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.