fix: memory leak issue

This commit is contained in:
dapan1121 2024-04-30 13:22:10 +08:00
parent 0ef476a09e
commit 2bd83169bb
1 changed files with 4 additions and 2 deletions

View File

@ -9327,9 +9327,11 @@ static int32_t addSubtableNameToCreateStreamQuery(STranslateContext* pCxt, SCrea
if (NULL == pStmt->pSubtable) {
return TSDB_CODE_SUCCESS;
}
pSelect->pSubtable = nodesCloneNode(pStmt->pSubtable);
if (NULL == pSelect->pSubtable) {
return TSDB_CODE_OUT_OF_MEMORY;
pSelect->pSubtable = nodesCloneNode(pStmt->pSubtable);
if (NULL == pSelect->pSubtable) {
return TSDB_CODE_OUT_OF_MEMORY;
}
}
SRewriteSubtableCxt cxt = {.pCxt = pCxt, .pPartitionList = pSelect->pPartitionByList};