commit 22bc463ea35785216436ee0648181579c6d2bb98b91003111174ebaca9d99ca7 from: Johannes Thyssen Tishman date: Sun Apr 27 18:50:30 2025 UTC remove /tmp/got-importmsg on empty import commit message ok stsp@ commit - 0c168bd5bdf0ddbb480304125aefcb7e3b833d68895cb72af54d3b60c3ed79a0 commit + 22bc463ea35785216436ee0648181579c6d2bb98b91003111174ebaca9d99ca7 blob - addf6a8d4d524e8c410f907cb1f6bbfe9e7c04dfc5101e7b722a99e3d02094d6 blob + 52309a158cca4b9f8cd04cd7afae6e5b8ab3a266a64399e9fe69cdfb47841601 --- got/got.c +++ got/got.c @@ -609,7 +609,9 @@ done: if (fd != -1 && close(fd) == -1 && err == NULL) err = got_error_from_errno2("close", *logmsg_path); free(initial_content); - if (err) { + + if (err && *logmsg_path) { + unlink(*logmsg_path); free(*logmsg_path); *logmsg_path = NULL; }