fix mem leak

This commit is contained in:
yihaoDeng 2023-01-03 20:35:26 +08:00
parent 68d84a1c37
commit b5dbc8439f
1 changed files with 3 additions and 1 deletions

View File

@ -121,10 +121,12 @@ void tsortClearOrderdSource(SArray* pOrderedSource) {
if ((*pSource)->param && !(*pSource)->onlyRef) {
taosMemoryFree((*pSource)->param);
}
if ((*pSource)->src.pBlock) {
if (!(*pSource)->onlyRef && (*pSource)->src.pBlock) {
blockDataDestroy((*pSource)->src.pBlock);
(*pSource)->src.pBlock = NULL;
}
taosMemoryFreeClear(*pSource);
}