fix:cleanup scheduler timer & remove destroy global variables to avoid heap use after free
This commit is contained in:
parent
020900e359
commit
1e156c9ce1
|
@ -84,8 +84,6 @@ void taos_cleanup(void) {
|
||||||
taosConvDestroy();
|
taosConvDestroy();
|
||||||
|
|
||||||
tmqMgmtClose();
|
tmqMgmtClose();
|
||||||
taosHashCleanup(appInfo.pInstMap);
|
|
||||||
taosHashCleanup(appInfo.pInstMapByClusterId);
|
|
||||||
|
|
||||||
tscInfo("all local resources released");
|
tscInfo("all local resources released");
|
||||||
taosCleanupCfg();
|
taosCleanupCfg();
|
||||||
|
|
|
@ -201,6 +201,7 @@ void schedulerDestroy(void) {
|
||||||
}
|
}
|
||||||
SCH_UNLOCK(SCH_WRITE, &schMgmt.hbLock);
|
SCH_UNLOCK(SCH_WRITE, &schMgmt.hbLock);
|
||||||
|
|
||||||
|
taosTmrCleanUp(schMgmt.timer);
|
||||||
qWorkerDestroy(&schMgmt.queryMgmt);
|
qWorkerDestroy(&schMgmt.queryMgmt);
|
||||||
schMgmt.queryMgmt = NULL;
|
schMgmt.queryMgmt = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue