From a18c053b09fb097854cfa36eeb4e046da28072d6 Mon Sep 17 00:00:00 2001 From: y-okumura-isp Date: Mon, 3 Feb 2020 19:19:09 +0900 Subject: [PATCH] Fix alloc-dealloc-mismatch(new->free) in test_info_by_topic (#469) 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 4d33c88aa..7e7b67724 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(