From ec4377789109d7247a8dd65eb34d009e81a72c00 Mon Sep 17 00:00:00 2001 From: y-okumura-isp <60122040+y-okumura-isp@users.noreply.github.com> Date: Tue, 10 Mar 2020 01:20:34 +0900 Subject: [PATCH] Fix alloc-dealloc-mismatch(new->free) in test_info_by_topic (#469) (#569) Signed-off-by: y-okumura-isp --- rcl/test/rcl/test_info_by_topic.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rcl/test/rcl/test_info_by_topic.cpp b/rcl/test/rcl/test_info_by_topic.cpp index 4d33c88..7e7b677 100644 --- a/rcl/test/rcl/test_info_by_topic.cpp +++ b/rcl/test/rcl/test_info_by_topic.cpp @@ -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( @@ -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(