teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0489-test-fix-a-memleak.patch

bd1529
From 7444c6ed3628484dfed2f204c5b78a06a50f4bd8 Mon Sep 17 00:00:00 2001
bd1529
From: Yu Watanabe <watanabe.yu+github@gmail.com>
bd1529
Date: Wed, 29 Aug 2018 23:27:42 +0900
bd1529
Subject: [PATCH] test: fix a memleak
bd1529
bd1529
Follow-up for #9901.
bd1529
bd1529
Fixes #9968.
bd1529
bd1529
(cherry picked from commit efa146369398fdb73f1cd177eb2522822ebf559c)
bd1529
bd1529
Related: #1812972
bd1529
---
bd1529
 src/test/test-install-root.c | 1 +
bd1529
 1 file changed, 1 insertion(+)
bd1529
bd1529
diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c
bd1529
index dbbcfe4297..fe1ca5b16f 100644
bd1529
--- a/src/test/test-install-root.c
bd1529
+++ b/src/test/test-install-root.c
bd1529
@@ -1037,6 +1037,7 @@ static void test_preset_multiple_instances(const char *root) {
bd1529
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "foo@bar1.service", &state) >= 0 && state == UNIT_FILE_ENABLED);
bd1529
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "foo@bartest.service", &state) >= 0 && state == UNIT_FILE_ENABLED);
bd1529
 
bd1529
+        unit_file_changes_free(changes, n_changes);
bd1529
 }
bd1529
 
bd1529
 int main(int argc, char *argv[]) {