repart: Make sure split partition files are cleaned up on failure
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user