fix: memory leak

This commit is contained in:
kailixu 2023-05-08 14:39:03 +08:00
parent bb7f050b37
commit b156fada25
2 changed files with 4 additions and 5 deletions

View File

@ -388,11 +388,10 @@ void doDestroyRequest(void *p) {
deregisterRequest(pRequest);
}
if (pRequest->syncQuery) {
if (pRequest->body.param) {
tsem_destroy(&((SSyncQueryParam *)pRequest->body.param)->sem);
}
if (pRequest->body.param) {
tsem_destroy(&((SSyncQueryParam *)pRequest->body.param)->sem);
taosMemoryFree(pRequest->body.param);
pRequest->body.param = NULL;
}
qDestroyQuery(pRequest->pQuery);

View File

@ -1368,7 +1368,7 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) {
tsem_wait(&pParam->sem);
_return:
taosArrayDestroy(catalogReq.pTableMeta);
taosArrayDestroyEx(catalogReq.pTableMeta, destoryTablesReq);
destroyRequest(pRequest);
return code;
}