From 34310df24c28fb012ca810fe068b3421f313e741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Sun, 30 Jun 2019 21:01:09 +0200 Subject: [PATCH] Fix memory leak of 56 bytes in test_graph MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- rcl/test/rcl/test_graph.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rcl/test/rcl/test_graph.cpp b/rcl/test/rcl/test_graph.cpp index 508a078..90381e0 100644 --- a/rcl/test/rcl/test_graph.cpp +++ b/rcl/test/rcl/test_graph.cpp @@ -343,6 +343,9 @@ TEST_F( this->node_ptr, &allocator, false, this->test_graph_node_name, "", &nat); EXPECT_EQ(RCL_RET_OK, ret) << rcl_get_error_string().str; 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.