test: fix a memleak
authorYu Watanabe <watanabe.yu+github@gmail.com>
Wed, 29 Aug 2018 14:27:42 +0000 (23:27 +0900)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 29 Aug 2018 15:45:37 +0000 (17:45 +0200)
Follow-up for #9901.

Fixes #9968.

src/test/test-install-root.c

index dbbcfe4..fe1ca5b 100644 (file)
@@ -1037,6 +1037,7 @@ static void test_preset_multiple_instances(const char *root) {
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "foo@bar1.service", &state) >= 0 && state == UNIT_FILE_ENABLED);
         assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "foo@bartest.service", &state) >= 0 && state == UNIT_FILE_ENABLED);
 
+        unit_file_changes_free(changes, n_changes);
 }
 
 int main(int argc, char *argv[]) {