fix(query):fix query operator memory leak
This commit is contained in:
parent
645b264cad
commit
983962238e
|
@ -56,6 +56,7 @@ static int32_t getTableList(void* pVnode, SScanPhysiNode* pScanNode, SNode* pTag
|
||||||
|
|
||||||
static int64_t getLimit(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->limit; }
|
static int64_t getLimit(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->limit; }
|
||||||
static int64_t getOffset(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->offset; }
|
static int64_t getOffset(const SNode* pLimit) { return NULL == pLimit ? -1 : ((SLimitNode*)pLimit)->offset; }
|
||||||
|
static void releaseColInfoData(void* pCol);
|
||||||
|
|
||||||
void initResultRowInfo(SResultRowInfo* pResultRowInfo) {
|
void initResultRowInfo(SResultRowInfo* pResultRowInfo) {
|
||||||
pResultRowInfo->size = 0;
|
pResultRowInfo->size = 0;
|
||||||
|
@ -531,7 +532,7 @@ static int32_t createResultData(SDataType* pType, int32_t numOfRows, SScalarPara
|
||||||
int32_t code = colInfoDataEnsureCapacity(pColumnData, numOfRows, true);
|
int32_t code = colInfoDataEnsureCapacity(pColumnData, numOfRows, true);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
terrno = code;
|
terrno = code;
|
||||||
taosMemoryFree(pColumnData);
|
releaseColInfoData(pColumnData);
|
||||||
return terrno;
|
return terrno;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1611,6 +1611,8 @@ int32_t getTableListInfo(const SExecTaskInfo* pTaskInfo, SArray** pList) {
|
||||||
int32_t code = extractTableList(pArray, pTaskInfo->pRoot);
|
int32_t code = extractTableList(pArray, pTaskInfo->pRoot);
|
||||||
if (code == 0) {
|
if (code == 0) {
|
||||||
*pList = pArray;
|
*pList = pArray;
|
||||||
|
} else {
|
||||||
|
taosArrayDestroy(pArray);
|
||||||
}
|
}
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1105,7 +1105,8 @@ int32_t createDataSinkParam(SDataSinkNode* pNode, void** pParam, SExecTaskInfo*
|
||||||
|
|
||||||
SArray* pInfoList = NULL;
|
SArray* pInfoList = NULL;
|
||||||
int32_t code = getTableListInfo(pTask, &pInfoList);
|
int32_t code = getTableListInfo(pTask, &pInfoList);
|
||||||
if (code || pInfoList == NULL) {
|
if (code != TSDB_CODE_SUCCESS || pInfoList == NULL) {
|
||||||
|
taosMemoryFree(pDeleterParam);
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue