Skip to content

Commit

Permalink
Fix alloc-dealloc-mismatch(new->free) in test_info_by_topic (#469) (#569
Browse files Browse the repository at this point in the history
)

Signed-off-by: y-okumura-isp <[email protected]>
Signed-off-by: Jorge Perez <[email protected]>
  • Loading branch information
y-okumura-isp authored and Blast545 committed Apr 9, 2020
1 parent f573b1a commit c2212d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rcl/test/rcl/test_info_by_topic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ TEST_F(
this->topic_endpoint_info_array.info_array = new rmw_topic_endpoint_info_t();
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT(
{
free(this->topic_endpoint_info_array.info_array);
delete this->topic_endpoint_info_array.info_array;
});
rcl_allocator_t allocator = rcl_get_default_allocator();
const auto ret = rcl_get_publishers_info_by_topic(
Expand All @@ -308,7 +308,7 @@ TEST_F(
this->topic_endpoint_info_array.info_array = new rmw_topic_endpoint_info_t();
OSRF_TESTING_TOOLS_CPP_SCOPE_EXIT(
{
free(this->topic_endpoint_info_array.info_array);
delete this->topic_endpoint_info_array.info_array;
});
rcl_allocator_t allocator = rcl_get_default_allocator();
const auto ret = rcl_get_subscriptions_info_by_topic(
Expand Down

0 comments on commit c2212d1

Please sign in to comment.