From ec0e62cd04453f7968fa47f580289d3d06734a1d 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 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 --- 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 508a078524..90381e0ea0 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.