diff --git a/modules/gridmap/grid_map.cpp b/modules/gridmap/grid_map.cpp index 67deedf8394..6df7835855d 100644 --- a/modules/gridmap/grid_map.cpp +++ b/modules/gridmap/grid_map.cpp @@ -813,6 +813,7 @@ void GridMap::_update_octants_callback() { } while (to_delete.front()) { + memdelete(octant_map[to_delete.front()->get()]); octant_map.erase(to_delete.front()->get()); to_delete.pop_front(); }