Merge pull request #11787 from taosdata/feature/sync-vnode-merge-3.0

fix bug, syncEnv free NULL
This commit is contained in:
Li Minghao 2022-04-24 13:54:37 +08:00 committed by GitHub
commit 1af668b490
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}