diff --git a/hist/hbook/src/THbookFile.cxx b/hist/hbook/src/THbookFile.cxx index 14bb92569e1346d725fa412ce86ab89cd2130fed..6a3f2ee0700234d3aa9eb2c01a07db25bde7bc46 100644 --- a/hist/hbook/src/THbookFile.cxx +++ b/hist/hbook/src/THbookFile.cxx @@ -596,7 +596,7 @@ TFile *THbookFile::Convert2root(const char *rootname, Int_t /*lrecl*/, opt.ToLower(); Int_t nch = strlen(rootname); - char *rfile; + char *rfile=0; if (nch) { rfile = new char[nch+1]; strcpy(rfile,rootname); @@ -618,7 +618,7 @@ TFile *THbookFile::Convert2root(const char *rootname, Int_t /*lrecl*/, gSystem->Exec(cmd); delete [] cmd; - if (opt.Contains("no")) return 0; + if (opt.Contains("no")) {delete [] rfile; return 0;} TFile *f = new TFile(rfile); delete [] rfile; if (f->IsZombie()) {delete f; f = 0;}