Commits

Anonymous committed 69fe5ef

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>

  • Participants
  • Parent commits 4637e47

Comments (0)

Files changed (1)

File builtin-verify-tag.c

 	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);