[TD-225] release the ref if insertion succeeds.

This commit is contained in:
Haojun Liao 2020-12-12 19:25:05 +08:00
parent ccc78f9f6a
commit c55c464664
1 changed files with 3 additions and 1 deletions

View File

@ -407,8 +407,10 @@ void tscResetSqlCmdObj(SSqlCmd* pCmd, bool removeFromCache) {
pCmd->autoCreated = 0;
for(int32_t i = 0; i < pCmd->numOfTables; ++i) {
if (pCmd->pTableMetaList[i] != NULL) {
taosCacheRelease(tscMetaCache, (void**)&(pCmd->pTableMetaList[i]), false);
}
}
pCmd->numOfTables = 0;
tfree(pCmd->pTableMetaList);