test: make the copied set not take the ownership of elements

This commit is contained in:
Yu Watanabe
2025-04-18 09:16:44 +09:00
parent b0a2d49b61
commit 828513ee3e
+2 -3
View File
@@ -145,9 +145,8 @@ TEST(set_ensure_allocated) {
}
TEST(set_copy) {
_cleanup_set_free_ Set *s = NULL;
_cleanup_set_free_free_ Set *copy = NULL;
char *key1, *key2, *key3, *key4;
_cleanup_set_free_ Set *s = NULL, *copy = NULL;
_cleanup_free_ char *key1 = NULL, *key2 = NULL, *key3 = NULL, *key4 = NULL;
key1 = strdup("key1");
assert_se(key1);