fix:[TS-4921] asan error
This commit is contained in:
parent
5dcfed2d51
commit
fe6eb5d8c3
|
@ -309,7 +309,7 @@ void stopAllRequests(SHashObj *pRequests) {
|
|||
}
|
||||
|
||||
void destroyAppInst(void *info) {
|
||||
SAppInstInfo* pAppInfo = (SAppInstInfo*)info;
|
||||
SAppInstInfo* pAppInfo = *(SAppInstInfo**)info;
|
||||
tscDebug("destroy app inst mgr %p", pAppInfo);
|
||||
|
||||
taosThreadMutexLock(&appInfo.mutex);
|
||||
|
|
|
@ -147,7 +147,7 @@ STscObj* taos_connect_internal(const char* ip, const char* user, const char* pas
|
|||
}
|
||||
p->pAppHbMgr = appHbMgrInit(p, key);
|
||||
if (NULL == p->pAppHbMgr) {
|
||||
destroyAppInst(p);
|
||||
destroyAppInst(&p);
|
||||
taosThreadMutexUnlock(&appInfo.mutex);
|
||||
taosMemoryFreeClear(key);
|
||||
return NULL;
|
||||
|
|
|
@ -28,16 +28,16 @@ static int32_t getSlowLogTmpDir(char* tmpPath, int32_t size){
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void destroyCounter(void* data){
|
||||
if (data == NULL) {
|
||||
return;
|
||||
}
|
||||
taos_counter_t* conuter = *(taos_counter_t**)data;
|
||||
if(conuter == NULL){
|
||||
return;
|
||||
}
|
||||
taos_counter_destroy(conuter);
|
||||
}
|
||||
//static void destroyCounter(void* data){
|
||||
// if (data == NULL) {
|
||||
// return;
|
||||
// }
|
||||
// taos_counter_t* conuter = *(taos_counter_t**)data;
|
||||
// if(conuter == NULL){
|
||||
// return;
|
||||
// }
|
||||
// taos_counter_destroy(conuter);
|
||||
//}
|
||||
|
||||
static void destroyClientFile(void* data){
|
||||
if (data == NULL) {
|
||||
|
@ -61,7 +61,7 @@ static void destroyMonitorClient(void* data){
|
|||
}
|
||||
taosHashCleanup(pMonitor->counters);
|
||||
taos_collector_registry_destroy(pMonitor->registry);
|
||||
taos_collector_destroy(pMonitor->colector);
|
||||
// taos_collector_destroy(pMonitor->colector);
|
||||
taosMemoryFree(pMonitor);
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ void monitorCreateClient(int64_t clusterId) {
|
|||
uError("failed to create monitor counters");
|
||||
goto fail;
|
||||
}
|
||||
taosHashSetFreeFp(pMonitor->counters, destroyCounter);
|
||||
// taosHashSetFreeFp(pMonitor->counters, destroyCounter);
|
||||
|
||||
if(taosHashPut(monitorCounterHash, &clusterId, LONG_BYTES, &pMonitor, POINTER_BYTES) != 0){
|
||||
uError("failed to put monitor client to hash");
|
||||
|
@ -606,7 +606,7 @@ void* monitorThreadFunc(void *param){
|
|||
}
|
||||
monitorFreeSlowLogData(slowLogData);
|
||||
taosFreeQitem(slowLogData);
|
||||
tsem2_wait(&monitorSem);
|
||||
tsem2_timewait(&monitorSem, 500);
|
||||
}
|
||||
|
||||
taosCloseQueue(monitorQueue);
|
||||
|
|
Loading…
Reference in New Issue