Skip to content

Commit

Permalink
sdformat: Hotfix for memory leak in Converter.cc (RobotLocomotion#12533)
Browse files Browse the repository at this point in the history
  • Loading branch information
EricCousineau-TRI authored Jan 3, 2020
1 parent 3901c76 commit 22d3edd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/workspace/sdformat/Converter.cc.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- src/Converter.cc Tue Dec 10 17:20:56 2019 +0100
+++ src/Converter.cc Fri Jan 03 17:03:14 2020 -0500
@@ -86,7 +86,7 @@

// Starting with the original SDF version, perform all the conversions
// necessary in order to reach the _toVersion.
- while (fromIter->first != _toVersion && fromIter != conversionMap.end())
+ while (fromIter != conversionMap.end() && fromIter->first != _toVersion)
{
// Get the SDF to version.
toVer = fromIter->second.first;
2 changes: 2 additions & 0 deletions tools/workspace/sdformat/repository.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ def sdformat_repository(
strip_prefix = "osrf-sdformat-%s" % (commit),
build_file = "@drake//tools/workspace/sdformat:package.BUILD.bazel",
mirrors = mirrors,
# TODO(eric.cousineau): Remove this once libsdformat incorporates it.
patches = ["@drake//tools/workspace/sdformat:Converter.cc.diff"],
)

0 comments on commit 22d3edd

Please sign in to comment.