test: fix various leaks in the tests

This commit is contained in:
Peter Hutterer
2024-01-04 10:15:26 +10:00
parent 373cd80081
commit 2cee5fb36c
7 changed files with 43 additions and 2 deletions

View File

@@ -63,17 +63,24 @@ xfree86_option_list_duplicate(void)
assert(strcmp(val1, v1) == 0);
assert(strcmp(val1, val2) == 0);
free(val1);
free(val2);
val1 = xf86CheckStrOption(options, o2, "1");
val2 = xf86CheckStrOption(duplicate, o2, "2");
assert(strcmp(val1, v2) == 0);
assert(strcmp(val1, val2) == 0);
free(val1);
free(val2);
a = xf86FindOption(options, o_null);
b = xf86FindOption(duplicate, o_null);
assert(a);
assert(b);
xf86OptionListFree(duplicate);
xf86OptionListFree(options);
}
static void