Просмотр исходного кода

HPCC-8673 Fix memory leaks when running Get Roxie Metrics

Valgrind reported memory leaks when running EclWatch Get Roxie
Metrics. I found that the leaks happened inside roxiecommlib.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>
Kevin Wang 12 лет назад
Родитель
Сommit
276468cc09
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      common/roxiecommlib/roxiecommunicationclient.cpp

+ 2 - 2
common/roxiecommlib/roxiecommunicationclient.cpp

@@ -405,9 +405,9 @@ public:
                 if (strchr(ip.str(), ':') == 0)
                     ip.appendf(":%d", ROXIE_SERVER_PORT);
 
-                IPropertyTree *t = sendRoxieControlQuery(xpath.str(), false, ip.str());
+                Owned<IPropertyTree> t = sendRoxieControlQuery(xpath.str(), false, ip.str());
                 if (t)
-                    tree->addPropTree("Endpoint", t->queryPropTree("Endpoint"));
+                    tree->addPropTree("Endpoint", t->getBranch("Endpoint"));
             }
             return tree;
         }