fix(stream): fix memory leak.

This commit is contained in:
Haojun Liao 2023-09-25 16:01:17 +08:00
parent 966ce4f30e
commit c615c513e8
2 changed files with 3 additions and 2 deletions

View File

@ -832,7 +832,7 @@ TEST(clientCase, projection_query_tables) {
for(int32_t i = 0; i < 1000000; ++i) {
char t[512] = {0};
sprintf(t, "insert into t1 values(%ld, %ld)", start + i, i);
sprintf(t, "insert into t1 values(now, %ld)", i);
while(1) {
void* p = taos_query(pConn, t);
code = taos_errno(p);

View File

@ -224,7 +224,7 @@ _err:
if (pMeta->db) tdbClose(pMeta->db);
if (pMeta->pHbInfo) taosMemoryFreeClear(pMeta->pHbInfo);
if (pMeta->pUpdateTaskSet) taosHashCleanup(pMeta->pUpdateTaskSet);
if (pMeta->startInfo.pReadyTaskSet) taosHashCleanup(pMeta->startInfo.pReadyTaskSet);
taosMemoryFree(pMeta);
stError("failed to open stream meta");
@ -339,6 +339,7 @@ void streamMetaCloseImpl(void* arg) {
taosHashCleanup(pMeta->pTasksMap);
taosHashCleanup(pMeta->pTaskBackendUnique);
taosHashCleanup(pMeta->pUpdateTaskSet);
taosHashCleanup(pMeta->startInfo.pReadyTaskSet);
taosMemoryFree(pMeta->pHbInfo);
taosMemoryFree(pMeta->path);