Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions io/io/src/TFileMerger.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Bool_t TFileMerger::AddAdoptFile(TFile *source, Bool_t cpProgress)

Bool_t TFileMerger::AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
{
if (source == 0) {
if (source == 0 || source->IsZombie()) {
return kFALSE;
}

Expand All @@ -240,16 +240,15 @@ Bool_t TFileMerger::AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
return kFALSE;
}
newfile = TFile::Open(localcopy, "READ");
// Zombie files should also be skipped
if (newfile && newfile->IsZombie()) {
delete newfile;
newfile = 0;
}
} else {
newfile = source;
}

// Zombie files should also be skipped
if (newfile && newfile->IsZombie()) {
delete newfile;
newfile = 0;
}

if (!newfile) {
if (fLocal)
Error("AddFile", "cannot open local copy %s of URL %s",
Expand Down
1 change: 1 addition & 0 deletions proof/proof/src/TPackMgr.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -842,6 +842,7 @@ Int_t TPackMgr::Install(const char *parpath, Bool_t rmold)
if (install) {
if (!TFile::Cp(psrc, dest)) {
Error("Install", "could not copy %s to %s", psrc.Data(), dest.Data());
if (md5) delete md5;
return -1;
}
}
Expand Down
6 changes: 5 additions & 1 deletion proof/proofd/src/proofexecv.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -639,9 +639,13 @@ int exportsock(rpdunix *conn)
if (d == 0 || d == 1 || d == 2) {
int fd = -1;
int natt = 1000;
while (natt > 0 && (fd = dup(d)) <= 2) { natt--; }
while (natt > 0 && (fd = dup(d)) <= 2) {
if (fd != d) close(fd);
natt--;
}
if (natt <= 0 && fd <= 2) {
Info("exportsock: ERROR: no free filedescriptor!");
if (fd != d) close(fd);
close(d);
return -1;
}
Expand Down
2 changes: 2 additions & 0 deletions test/stressProof.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1722,6 +1722,7 @@ Int_t PT_CheckSimple(TQueryResult *qr, Long64_t nevt, Int_t nhist)
hist[i] = dynamic_cast<TH1F *>(TProof::GetOutput(Form("h%d",i), out));
if (!hist[i]) {
printf("\n >>> Test failure: 'h%d' histo not found\n", i);
delete[] hist;
return -1;
}
}
Expand All @@ -1733,6 +1734,7 @@ Int_t PT_CheckSimple(TQueryResult *qr, Long64_t nevt, Int_t nhist)
Double_t rms = hist[i]->GetRMS();
if (TMath::Abs(ave) > 5 * rms / TMath::Sqrt(hist[i]->GetEntries())) {
printf("\n >>> Test failure: 'h%d' histo: mean > 5 * RMS/Sqrt(N)\n", i);
delete[] hist;
return -1;
}
}
Expand Down
15 changes: 9 additions & 6 deletions tree/treeplayer/src/TSelectorDraw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ void TSelectorDraw::Begin(TTree *tree)
abrt.Form("An object of type '%s' has the same name as the requested histo (%s)", oldObject->IsA()->GetName(), hname);
Abort(abrt);
return;
delete[] varexp;
}
if (fOldHistogram && !hnameplus) fOldHistogram->Reset(); // reset unless adding is wanted

Expand All @@ -398,6 +399,7 @@ void TSelectorDraw::Begin(TTree *tree)
abrt.Form("An object of type '%s' has the same name as the requested event list (%s)",
oldObject->IsA()->GetName(), hname);
Abort(abrt);
delete[] varexp;
return;
}
if (!enlist) {
Expand Down Expand Up @@ -447,7 +449,7 @@ void TSelectorDraw::Begin(TTree *tree)
// We have been asked to reset the input list!!
// Let's set it aside for now ...
Abort("Input and output lists are the same!");
delete [] varexp;
delete[] varexp;
return;
}
evlist->Reset();
Expand Down Expand Up @@ -477,17 +479,17 @@ void TSelectorDraw::Begin(TTree *tree)
if (!CompileVariables(varexp, realSelection.GetTitle())) {
abrt.Form("Variable compilation failed: {%s,%s}", varexp, realSelection.GetTitle());
Abort(abrt);
delete [] varexp;
delete[] varexp;
return;
}
if (fDimension > 4 && !(optpara || optcandle || opt5d || opt.Contains("goff"))) {
Abort("Too many variables. Use the option \"para\", \"gl5d\" or \"candle\" to display more than 4 variables.");
delete [] varexp;
delete[] varexp;
return;
}
if (fDimension < 2 && (optpara || optcandle)) {
Abort("The options \"para\" and \"candle\" require at least 2 variables.");
delete [] varexp;
delete[] varexp;
return;
}

Expand Down Expand Up @@ -530,6 +532,7 @@ void TSelectorDraw::Begin(TTree *tree)
gROOT->MakeDefCanvas();
if (!gPad) {
Abort("Creation of default canvas failed");
delete[] varexp;
return;
}
}
Expand Down Expand Up @@ -889,8 +892,8 @@ void TSelectorDraw::Begin(TTree *tree)
else if (opt5d) fAction = 8;
else fAction = 6;
}
if (varexp) delete [] varexp;
if (hnamealloc) delete [] hnamealloc;
if (varexp) delete[] varexp;
if (hnamealloc) delete[] hnamealloc;
for (i = 0; i < fValSize; ++i)
fVarMultiple[i] = kFALSE;
fSelectMultiple = kFALSE;
Expand Down