From 89a5c0c5c8179b622887d1cc684f4307043c66c7 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Sun, 30 Jul 2017 18:47:03 -0400 Subject: [PATCH] moved BWTFree() into BWTIncFree() BWTFree() is not for build. Only BWTIncFree() is needed. --- bwt_gen.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/bwt_gen.c b/bwt_gen.c index acea99b..3adcc22 100644 --- a/bwt_gen.c +++ b/bwt_gen.c @@ -1544,19 +1544,13 @@ BWTInc *BWTIncConstructFromPacked(const char *inputFileName, bgint_t initialMaxB return bwtInc; } -void BWTFree(BWT *bwt) -{ - if (bwt == 0) return; - free(bwt->cumulativeFreq); - free(bwt->occValueMajor); - free(bwt->decodeTable); - free(bwt); -} - void BWTIncFree(BWTInc *bwtInc) { if (bwtInc == 0) return; - BWTFree(bwtInc->bwt); + free(bwtInc->bwt->cumulativeFreq); + free(bwtInc->bwt->occValueMajor); + free(bwtInc->bwt->decodeTable); + free(bwtInc->bwt); free(bwtInc->workingMemory); free(bwtInc->cumulativeCountInCurrentBuild); free(bwtInc->packedShift);