Commit Diff


commit - c167432e009e807556a97fe8c2c74362a726e9a7
commit + 7e320d3b050a09132d29db243fa3940d96707346
blob - 872cc74858a6d9a7d5be7fffffe97fc4f28c9927
blob + 9483d742cf03e1b1222540c193592d1caed4458a
--- got/got.c
+++ got/got.c
@@ -9203,6 +9203,9 @@ done:
 	    error == NULL)
 		error = got_error_from_errno2("unlink", cl_arg.logmsg_path);
 	free(cl_arg.logmsg_path);
+	if (merged_logmsg && unlink(merged_logmsg) == -1 && error == NULL)
+		error = got_error_from_errno2("unlink", merged_logmsg);
+	free(merged_logmsg);
 	if (repo) {
 		const struct got_error *close_err = got_repo_close(repo);
 		if (error == NULL)