Skip to content

Commit

Permalink
Fix two 1-element memory leaks, and don't create an unused ovStoreHis…
Browse files Browse the repository at this point in the history
…togram object.
  • Loading branch information
brianwalenz committed Sep 8, 2017
1 parent f8f55b0 commit e88ad47
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/stores/ovStoreBuild.C
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ computeIIDperBucket(uint32 fileLimit,
olapsPerBucketMax * GBperOlap + MEMORY_OVERHEAD / 1024.0 / 1024.0 / 1024.0);
fprintf(stderr, "\n");

delete hist;
delete [] oPR;
delete hist;

return(iidToBucket);
}
Expand Down Expand Up @@ -540,6 +541,8 @@ main(int argc, char **argv) {
delete inputFile;
}

delete [] iidToBucket;

for (uint32 i=0; i<dumpFileMax; i++)
delete dumpFile[i];

Expand Down Expand Up @@ -579,8 +582,6 @@ main(int argc, char **argv) {
if (dumpLengthMax < dumpLength[i])
dumpLengthMax = dumpLength[i];

ovStoreHistogram *histogram = new ovStoreHistogram;

ovOverlap *overlapsort = ovOverlap::allocateOverlaps(gkp, dumpLengthMax);

for (uint32 i=0; i<dumpFileMax; i++) {
Expand Down

0 comments on commit e88ad47

Please sign in to comment.