Fix memory leak of 56 bytes in test_graph
test_rcl_get_publisher_names_and_types_by_node was finalizing without calling to rcl_names_and_types_fini which was generating a memory leak. These lines fix the leak. Complete report in the pull request Signed-off-by: Víctor Mayoral Vilches <v.mayoralv@gmail.com>
This commit is contained in:
parent
e9a71b40f7
commit
34310df24c
1 changed files with 3 additions and 0 deletions
|
@ -343,6 +343,9 @@ TEST_F(
|
||||||
this->node_ptr, &allocator, false, this->test_graph_node_name, "", &nat);
|
this->node_ptr, &allocator, false, this->test_graph_node_name, "", &nat);
|
||||||
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
|
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
|
||||||
rcl_reset_error();
|
rcl_reset_error();
|
||||||
|
|
||||||
|
ret = rcl_names_and_types_fini(&nat);
|
||||||
|
EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Test the rcl_get_subscriber_names_and_types_by_node function.
|
/* Test the rcl_get_subscriber_names_and_types_by_node function.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue