fix: stmt memory leak
This commit is contained in:
parent
0e061fb53c
commit
4359562e9c
|
@ -152,7 +152,8 @@ int32_t stmtRestoreQueryFields(STscStmt* pStmt) {
|
|||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
int32_t stmtUpdateBindInfo(TAOS_STMT* stmt, STableMeta* pTableMeta, void* tags, SName* tbName, const char* sTableName, bool autoCreateTbl) {
|
||||
int32_t stmtUpdateBindInfo(TAOS_STMT* stmt, STableMeta* pTableMeta, void* tags, SName* tbName, const char* sTableName,
|
||||
bool autoCreateTbl) {
|
||||
STscStmt* pStmt = (STscStmt*)stmt;
|
||||
char tbFName[TSDB_TABLE_FNAME_LEN];
|
||||
tNameExtractFullName(tbName, tbFName);
|
||||
|
@ -300,7 +301,7 @@ int32_t stmtCleanExecInfo(STscStmt* pStmt, bool keepTable, bool deepClean) {
|
|||
continue;
|
||||
}
|
||||
|
||||
if (STMT_TYPE_MULTI_INSERT == pStmt->sql.type) {
|
||||
if (pBlocks->cloned) {
|
||||
qFreeStmtDataBlock(pBlocks);
|
||||
} else {
|
||||
qDestroyStmtDataBlock(pBlocks);
|
||||
|
|
|
@ -461,7 +461,9 @@ void qFreeStmtDataBlock(void* pDataBlock) {
|
|||
return;
|
||||
}
|
||||
|
||||
insDestroyDataBlock((STableDataBlocks*)pDataBlock);
|
||||
taosMemoryFreeClear(((STableDataBlocks*)pDataBlock)->pTableMeta);
|
||||
taosMemoryFreeClear(((STableDataBlocks*)pDataBlock)->pData);
|
||||
taosMemoryFreeClear(pDataBlock);
|
||||
}
|
||||
|
||||
void qDestroyStmtDataBlock(void* pBlock) {
|
||||
|
|
Loading…
Reference in New Issue