diff --git a/test/test_htable.c b/test/test_htable.c index 29e8bca..61a6889 100644 --- a/test/test_htable.c +++ b/test/test_htable.c @@ -241,6 +241,7 @@ START_TEST (test_htable_remove_foreach) UC_HTABLE_FOREACH_HASH_SAFE(&table, it, next, hash_str("One")) { uc_htable_remove(&table, it); + memset(it, 0xff, sizeof *it); removed++; } @@ -342,6 +343,7 @@ START_TEST (test_htable_foreach_safe) UC_HTABLE_FOREACH_SAFE(&table, it, next) { uc_htable_remove(&table, it); + memset(it, 0xff, sizeof *it); } fail_if(my_find(&table, "One", hash_str("One")) != NULL);