File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ bool rtt_ros::import(const std::string& package)
62
62
dep_names.push (package);
63
63
deps_to_import.push_back (package);
64
64
65
- const xmlChar * rtt_plugin_depend_xpath = xmlCharStrdup (" /package/export/rtt_ros/plugin_depend/text()" );
65
+ xmlChar * rtt_plugin_depend_xpath = xmlCharStrdup (" /package/export/rtt_ros/plugin_depend/text()" );
66
66
67
67
while (!dep_names.empty ())
68
68
{
@@ -126,7 +126,9 @@ bool rtt_ros::import(const std::string& package)
126
126
for (int i=0 ; i < xpath_obj->nodesetval ->nodeNr ; i++) {
127
127
if (xpath_obj->nodesetval ->nodeTab [i]) {
128
128
std::ostringstream oss;
129
- oss << xmlNodeGetContent (xpath_obj->nodesetval ->nodeTab [i]);
129
+ xmlChar * dep_str = xmlNodeGetContent (xpath_obj->nodesetval ->nodeTab [i]);
130
+ oss << dep_str;
131
+ xmlFree (dep_str);
130
132
RTT::log (RTT::Debug) << " Found dependency \" " << oss.str () << " \" " <<RTT::endlog ();
131
133
dep_names.push (oss.str ());
132
134
@@ -141,6 +143,7 @@ bool rtt_ros::import(const std::string& package)
141
143
xmlFreeDoc (package_doc);
142
144
xmlCleanupParser ();
143
145
}
146
+ xmlFree (rtt_plugin_depend_xpath);
144
147
145
148
// Build path list by prepending paths from search_paths list to the RTT component path in reverse order without duplicates
146
149
std::set<std::string> search_paths_seen;
You can’t perform that action at this time.
0 commit comments