diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -4352,8 +4352,10 @@ node.GetElementText(target_info.osabi); } else if (name == "xi:include" || name == "include") { llvm::StringRef href = node.GetAttributeValue("href"); - if (!href.empty()) + if (!href.empty()) { target_info.includes.push_back(href.str()); + xmlFree(const_cast(href.data())); + } } else if (name == "feature") { feature_nodes.push_back(node); } else if (name == "groups") {