Skip to content

Commit eca5ae1

Browse files
author
Chen Lihui
authored
fix memory leak (#423)
Signed-off-by: Chen Lihui <[email protected]>
1 parent d297abe commit eca5ae1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

test/test_hash_map.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ TEST_F(HashMapBaseTest, init_map_initial_capacity_not_power_of_two) {
103103
size_t current_capacity = 0;
104104
ASSERT_EQ(RCUTILS_RET_OK, rcutils_hash_map_get_capacity(&map, &current_capacity));
105105
EXPECT_EQ(4u, current_capacity);
106+
ret = rcutils_hash_map_fini(&map);
107+
EXPECT_EQ(RCUTILS_RET_OK, ret) << rcutils_get_error_string().str;
106108
}
107109

108110
TEST_F(HashMapBaseTest, init_map_key_size_zero_fails) {

0 commit comments

Comments
 (0)