From 2680a9d5137afe5e0c77a556a28175c46ec1656e Mon Sep 17 00:00:00 2001 From: William Woodall Date: Fri, 15 Jun 2018 17:41:05 -0700 Subject: [PATCH] use allocator to free too --- rmw_fastrtps_cpp/src/rmw_node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rmw_fastrtps_cpp/src/rmw_node.cpp b/rmw_fastrtps_cpp/src/rmw_node.cpp index a9f533e9a..a4915afa0 100644 --- a/rmw_fastrtps_cpp/src/rmw_node.cpp +++ b/rmw_fastrtps_cpp/src/rmw_node.cpp @@ -206,11 +206,11 @@ get_security_file_paths( if (rcutils_is_readable(file_path)) { security_files_paths[i] = file_prefix + std::string(file_path); } else { - free(file_path); + allocator.deallocate(file_path, allocator.state); return false; } - free(file_path); + allocator.deallocate(file_path, allocator.state); } return true;