projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6210834
)
repart: Make sure split partition files are cleaned up on failure
author
Daan De Meyer
<daan.j.demeyer@gmail.com>
Thu, 24 Nov 2022 08:50:04 +0000
(09:50 +0100)
committer
Daan De Meyer
<daan.j.demeyer@gmail.com>
Tue, 29 Nov 2022 09:08:51 +0000
(10:08 +0100)
src/partition/repart.c
patch
|
blob
|
history
diff --git
a/src/partition/repart.c
b/src/partition/repart.c
index 860ffdae36e89d0f6e8e53045c6ad04b039472e9..6d94da639f793dc3136c33cbe38698d9830240a1 100644
(file)
--- a/
src/partition/repart.c
+++ b/
src/partition/repart.c
@@
-355,7
+355,7
@@
static Partition* partition_free(Partition *p) {
free(p->roothash);
free(p->split_name_format);
- free(p->split_path);
+
unlink_and_
free(p->split_path);
return mfree(p);
}
@@
-6495,6
+6495,9
@@
static int run(int argc, char *argv[]) {
(void) context_dump(context, node, /*late=*/ true);
+ LIST_FOREACH(partitions, p, context->partitions)
+ p->split_path = mfree(p->split_path);
+
return 0;
}