]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Fixing resource leak
authormfasel <mfasel@lbl.gov>
Mon, 12 Jan 2015 10:43:06 +0000 (11:43 +0100)
committermfasel <mfasel@lbl.gov>
Mon, 12 Jan 2015 13:10:42 +0000 (14:10 +0100)
PWG/Tools/AliJSONReader.cxx

index 49711aec0e889dd1d248fbd628c2d3b695ebf181..18d0568da3cc7233da2eb5ede98f956eb65d67df 100644 (file)
@@ -114,6 +114,8 @@ TList* AliJSONReader::Decode(const char* jsonstring) const {
   std::vector<AliJSONSyntaxTreeNode *> &daughters = ast->GetDaughters();
   for(std::vector<AliJSONSyntaxTreeNode *>::iterator it = daughters.begin(); it != daughters.end(); it++)
     AddNodeToList(*it, entries);
+  // Delete the syntax tree after being done
+  delete ast;
   return entries;
 }