Skip to content

Commit

Permalink
prevent unreleased Poco XML object leak, re #11467
Browse files Browse the repository at this point in the history
  • Loading branch information
FedeMPouzols committed Apr 1, 2015
1 parent ffb7163 commit fdef668
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Code/Mantid/Framework/Kernel/src/ComputeResourceInfo.cpp
Expand Up @@ -47,7 +47,8 @@ ComputeResourceInfo::ComputeResourceInfo(const FacilityInfo *fac,

const std::string baseTag = "baseURL";
Poco::AutoPtr<Poco::XML::NodeList> nl = elem->getElementsByTagName(baseTag);
if (!nl || nl->length() != 1 || !nl->item(0) || !nl->item(0)->childNodes()) {
if (!nl || nl->length() != 1 || !nl->item(0) ||
!nl->item(0)->hasChildNodes()) {
g_log.error("Failed to get base URL for remote compute resource '" +
m_name + "'");
throw std::runtime_error("Remote compute resources must have exactly one "
Expand Down

0 comments on commit fdef668

Please sign in to comment.