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 <y-okumura@isp.co.jp>
  • Loading branch information
y-okumura-isp authored Mar 9, 2020
1 parent 40ba55b commit ec43777
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 ec43777

Please sign in to comment.