Skip to content

Commit

Permalink
fix use after free (ros-navigation#3910)
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMacenski authored Oct 28, 2023
1 parent a11cdd8 commit 57fa22f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nav2_system_tests/src/planning/planner_tester.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class NavFnPlannerTester : public nav2_planner::PlannerServer

void setCostmap(nav2_util::Costmap * costmap)
{
std::unique_lock<nav2_costmap_2d::Costmap2D::mutex_t> lock(
*(costmap_ros_->getCostmap()->getMutex()));

nav2_msgs::msg::CostmapMetaData prop;
nav2_msgs::msg::Costmap cm = costmap->get_costmap(prop);
prop = cm.metadata;
Expand Down

0 comments on commit 57fa22f

Please sign in to comment.