edit-util: unlink temporary file on failure

Addresses the suggestion
https://github.com/systemd/systemd/pull/26756#discussion_r1133078705.
This commit is contained in:
Yu Watanabe
2023-03-11 22:20:54 +09:00
parent aec8200b12
commit 0a742f3622
+1 -1
View File
@@ -106,7 +106,7 @@ int edit_files_add(
}
static int create_edit_temp_file(EditFile *e) {
_cleanup_free_ char *temp = NULL;
_cleanup_(unlink_and_freep) char *temp = NULL;
unsigned line = 1;
int r;