fix: memory leak
This commit is contained in:
parent
bb7f050b37
commit
b156fada25
|
@ -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) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue