diff --git a/src/client/src/tscProfile.c b/src/client/src/tscProfile.c index acc5acd786bfe00036e539a104da04af1485a263..18fc79c4748f84d4ec073e4bc678e3a067afb025 100644 --- a/src/client/src/tscProfile.c +++ b/src/client/src/tscProfile.c @@ -39,6 +39,7 @@ void tscInitConnCb(void *param, TAOS_RES *result, int code) { tscSlowQueryConnInitialized = true; tscSaveSlowQueryFp(sql, NULL); } + taos_free_result(result); } void tscAddIntoSqlList(SSqlObj *pSql) { @@ -69,6 +70,7 @@ void tscSaveSlowQueryFpCb(void *param, TAOS_RES *result, int code) { } else { tscDebug("success to save slow query, code:%d", code); } + taos_free_result(result); } void tscSaveSlowQueryFp(void *handle, void *tmrId) { diff --git a/src/client/src/tscSubquery.c b/src/client/src/tscSubquery.c index 6ebbeeef411f8922662e7045027cf55410cbf89d..4f5a9feae21a208cb4615731f68367e53602a023 100644 --- a/src/client/src/tscSubquery.c +++ b/src/client/src/tscSubquery.c @@ -2197,6 +2197,7 @@ int32_t tscHandleInsertRetry(SSqlObj* pSql) { STableDataBlocks* pTableDataBlock = taosArrayGetP(pCmd->pDataBlocks, pSupporter->index); int32_t code = tscCopyDataBlockToPayload(pSql, pTableDataBlock); + pCmd->pDataBlocks = tscDestroyBlockArrayList(pCmd->pDataBlocks); if ((pRes->code = code)!= TSDB_CODE_SUCCESS) { tscQueueAsyncRes(pSql); diff --git a/src/client/src/tscSystem.c b/src/client/src/tscSystem.c index 9e9a00550a4497ae11cbdffe48991c2fd7b742d6..dc51482ce877c8b77b49414d96285a50811f679d 100644 --- a/src/client/src/tscSystem.c +++ b/src/client/src/tscSystem.c @@ -147,7 +147,7 @@ void taos_init_imp(void) { tscObjCache = taosCacheInit(TSDB_CACHE_PTR_KEY, refreshTime / 2, false, tscFreeRegisteredSqlObj, "sqlObj"); } - tscRefId = taosOpenRef(200, tscCloseTscObj); + tscRefId = taosOpenRef(500, tscCloseTscObj); // in other language APIs, taos_cleanup is not available yet. // So, to make sure taos_cleanup will be invoked to clean up the allocated