Skip to content

Commit

Permalink
use allocator to free too
Browse files Browse the repository at this point in the history
  • Loading branch information
wjwwood committed Jun 16, 2018
1 parent 16827a4 commit 2680a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2680a9d

Please sign in to comment.