fix(stream): fix memory leak.
This commit is contained in:
parent
4af7812f0b
commit
a32b56f381
|
@ -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);
|
||||
|
|
|
@ -225,7 +225,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");
|
||||
|
@ -340,6 +340,7 @@ void streamMetaCloseImpl(void* arg) {
|
|||
taosHashCleanup(pMeta->pTasksMap);
|
||||
taosHashCleanup(pMeta->pTaskBackendUnique);
|
||||
taosHashCleanup(pMeta->pUpdateTaskSet);
|
||||
taosHashCleanup(pMeta->startInfo.pReadyTaskSet);
|
||||
|
||||
taosMemoryFree(pMeta->pHbInfo);
|
||||
taosMemoryFree(pMeta->path);
|
||||
|
|
Loading…
Reference in New Issue