fix: fix memory sanitizer error
This commit is contained in:
parent
c7c7d7a8e2
commit
e35553d6a0
|
@ -101,7 +101,11 @@ static int32_t sortComparCleanup(SMsortComparParam* cmpParam) {
|
||||||
for (int32_t i = 0; i < cmpParam->numOfSources; ++i) {
|
for (int32_t i = 0; i < cmpParam->numOfSources; ++i) {
|
||||||
SSortSource* pSource = cmpParam->pSources[i];
|
SSortSource* pSource = cmpParam->pSources[i];
|
||||||
blockDataDestroy(pSource->src.pBlock);
|
blockDataDestroy(pSource->src.pBlock);
|
||||||
|
if (pSource->pageIdList) {
|
||||||
|
taosArrayDestroy(pSource->pageIdList);
|
||||||
|
}
|
||||||
taosMemoryFreeClear(pSource);
|
taosMemoryFreeClear(pSource);
|
||||||
|
cmpParam->pSources[i] = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmpParam->numOfSources = 0;
|
cmpParam->numOfSources = 0;
|
||||||
|
@ -123,9 +127,11 @@ void tsortClearOrderdSource(SArray* pOrderedSource, int64_t *fetchUs, int64_t *f
|
||||||
// release pageIdList
|
// release pageIdList
|
||||||
if ((*pSource)->pageIdList) {
|
if ((*pSource)->pageIdList) {
|
||||||
taosArrayDestroy((*pSource)->pageIdList);
|
taosArrayDestroy((*pSource)->pageIdList);
|
||||||
|
(*pSource)->pageIdList = NULL;
|
||||||
}
|
}
|
||||||
if ((*pSource)->param && !(*pSource)->onlyRef) {
|
if ((*pSource)->param && !(*pSource)->onlyRef) {
|
||||||
taosMemoryFree((*pSource)->param);
|
taosMemoryFree((*pSource)->param);
|
||||||
|
(*pSource)->param = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*pSource)->onlyRef && (*pSource)->src.pBlock) {
|
if (!(*pSource)->onlyRef && (*pSource)->src.pBlock) {
|
||||||
|
|
Loading…
Reference in New Issue