fix:[TD-31962]memory leak by crash_gen
This commit is contained in:
parent
1850f3fb52
commit
295a34fc55
|
@ -941,7 +941,7 @@ void taos_init_imp(void) {
|
||||||
tscInitRes = TSDB_CODE_OUT_OF_MEMORY;
|
tscInitRes = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// taosHashSetFreeFp(appInfo.pInstMap, destroyAppInst); avoid heap use after free
|
taosHashSetFreeFp(appInfo.pInstMap, destroyAppInst);
|
||||||
deltaToUtcInitOnce();
|
deltaToUtcInitOnce();
|
||||||
|
|
||||||
char logDirName[64] = {0};
|
char logDirName[64] = {0};
|
||||||
|
|
|
@ -77,7 +77,10 @@ bool chkRequestKilled(void* param) {
|
||||||
return killed;
|
return killed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cleanupAppInfo() { taosHashCleanup(appInfo.pInstMap); }
|
void cleanupAppInfo() {
|
||||||
|
taosHashCleanup(appInfo.pInstMap);
|
||||||
|
taosHashCleanup(appInfo.pInstMapByClusterId);
|
||||||
|
}
|
||||||
|
|
||||||
static int32_t taosConnectImpl(const char* user, const char* auth, const char* db, __taos_async_fn_t fp, void* param,
|
static int32_t taosConnectImpl(const char* user, const char* auth, const char* db, __taos_async_fn_t fp, void* param,
|
||||||
SAppInstInfo* pAppInfo, int connType, STscObj** pTscObj);
|
SAppInstInfo* pAppInfo, int connType, STscObj** pTscObj);
|
||||||
|
|
|
@ -73,6 +73,8 @@ void taos_cleanup(void) {
|
||||||
tscWarn("failed to cleanup task queue");
|
tscWarn("failed to cleanup task queue");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tmqMgmtClose();
|
||||||
|
|
||||||
int32_t id = clientReqRefPool;
|
int32_t id = clientReqRefPool;
|
||||||
clientReqRefPool = -1;
|
clientReqRefPool = -1;
|
||||||
taosCloseRef(id);
|
taosCloseRef(id);
|
||||||
|
@ -87,9 +89,6 @@ void taos_cleanup(void) {
|
||||||
tscDebug("rpc cleanup");
|
tscDebug("rpc cleanup");
|
||||||
|
|
||||||
taosConvDestroy();
|
taosConvDestroy();
|
||||||
|
|
||||||
tmqMgmtClose();
|
|
||||||
|
|
||||||
DestroyRegexCache();
|
DestroyRegexCache();
|
||||||
|
|
||||||
tscInfo("all local resources released");
|
tscInfo("all local resources released");
|
||||||
|
|
Loading…
Reference in New Issue