summaryrefslogtreecommitdiffstats
path: root/src/partition/repart.c
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-28 14:29:50 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-08-30 12:13:13 +0200
commit9f482c5a053b10da53a6dfcd7cc4b4e8a3883663 (patch)
tree48307aaec15a6b0dbaef9694c8a357f9b761cb18 /src/partition/repart.c
parentimage-policy: Fix size assertion (diff)
downloadsystemd-9f482c5a053b10da53a6dfcd7cc4b4e8a3883663.tar.xz
systemd-9f482c5a053b10da53a6dfcd7cc4b4e8a3883663.zip
repart: Fix memory leak
Diffstat (limited to 'src/partition/repart.c')
-rw-r--r--src/partition/repart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/partition/repart.c b/src/partition/repart.c
index bca9f28372..00b73904a3 100644
--- a/src/partition/repart.c
+++ b/src/partition/repart.c
@@ -470,6 +470,7 @@ static Partition* partition_free(Partition *p) {
strv_free(p->exclude_files_target);
strv_free(p->make_directories);
strv_free(p->subvolumes);
+ free(p->default_subvolume);
free(p->verity_match_key);
iovec_done(&p->roothash);
@@ -505,6 +506,7 @@ static void partition_foreignize(Partition *p) {
p->exclude_files_target = strv_free(p->exclude_files_target);
p->make_directories = strv_free(p->make_directories);
p->subvolumes = strv_free(p->subvolumes);
+ p->default_subvolume = mfree(p->default_subvolume);
p->verity_match_key = mfree(p->verity_match_key);
p->priority = 0;