From: Yu Watanabe Date: Wed, 3 Sep 2025 21:52:01 +0000 (+0900) Subject: repart: fix memleak X-Git-Tag: v258-rc4~16^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F38756%2Fhead;p=thirdparty%2Fsystemd.git repart: fix memleak Fixes a bug in 1a0541d44c78ced78a566051ec8f63417370aeaa (v256). --- diff --git a/src/repart/repart.c b/src/repart/repart.c index 961d5d0e334..a1c49b3b02f 100644 --- a/src/repart/repart.c +++ b/src/repart/repart.c @@ -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,