repart: fix memleak

Fixes a bug in 1a0541d44c (v256).
This commit is contained in:
Yu Watanabe
2025-09-04 06:52:17 +09:00
parent a1eb53e934
commit 975f27a2b5
+3 -1
View File
@@ -7859,7 +7859,7 @@ static int context_fstab(Context *context) {
fputs(AUTOMATIC_FSTAB_HEADER_START "\n", f);
LIST_FOREACH(partitions, p, context->partitions) {
_cleanup_free_ char *what = NULL, *options = NULL;
_cleanup_free_ char *what = NULL;
if (!need_fstab_one(p))
continue;
@@ -7869,6 +7869,8 @@ static int context_fstab(Context *context) {
return r;
FOREACH_ARRAY(mountpoint, p->mountpoints, p->n_mountpoints) {
_cleanup_free_ char *options = NULL;
r = partition_pick_mount_options(
p->type.designator,
p->format,