fix bug, syncEnv free NULL

This commit is contained in:
Li Minghao 2022-04-23 22:38:49 -07:00
parent caaa87ed83
commit 9c9d57c961
1 changed files with 4 additions and 2 deletions

View File

@ -91,8 +91,10 @@ static SSyncEnv *doSyncEnvStart() {
}
static int32_t doSyncEnvStop(SSyncEnv *pSyncEnv) {
taosTmrCleanUp(pSyncEnv->pTimerManager);
taosMemoryFree(pSyncEnv);
if (pSyncEnv != NULL) {
taosTmrCleanUp(pSyncEnv->pTimerManager);
taosMemoryFree(pSyncEnv);
}
return 0;
}