提交 a99db2e3 编写于 作者: K kailixu

fix: memory leak

上级 39369ae5
...@@ -388,11 +388,10 @@ void doDestroyRequest(void *p) { ...@@ -388,11 +388,10 @@ void doDestroyRequest(void *p) {
deregisterRequest(pRequest); deregisterRequest(pRequest);
} }
if (pRequest->syncQuery) {
if (pRequest->body.param) { if (pRequest->body.param) {
tsem_destroy(&((SSyncQueryParam *)pRequest->body.param)->sem); tsem_destroy(&((SSyncQueryParam *)pRequest->body.param)->sem);
}
taosMemoryFree(pRequest->body.param); taosMemoryFree(pRequest->body.param);
pRequest->body.param = NULL;
} }
qDestroyQuery(pRequest->pQuery); qDestroyQuery(pRequest->pQuery);
......
...@@ -1368,7 +1368,7 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) { ...@@ -1368,7 +1368,7 @@ int taos_load_table_info(TAOS *taos, const char *tableNameList) {
tsem_wait(&pParam->sem); tsem_wait(&pParam->sem);
_return: _return:
taosArrayDestroy(catalogReq.pTableMeta); taosArrayDestroyEx(catalogReq.pTableMeta, destoryTablesReq);
destroyRequest(pRequest); destroyRequest(pRequest);
return code; return code;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册