提交 fcc50467 编写于 作者: M Minghao Li

fix(sync): fix AddressSanitizer error

上级 23913916
...@@ -1040,6 +1040,7 @@ void syncNodeClose(SSyncNode* pSyncNode) { ...@@ -1040,6 +1040,7 @@ void syncNodeClose(SSyncNode* pSyncNode) {
ret = raftStoreClose(pSyncNode->pRaftStore); ret = raftStoreClose(pSyncNode->pRaftStore);
ASSERT(ret == 0); ASSERT(ret == 0);
pSyncNode->pRaftStore = NULL;
syncRespMgrDestroy(pSyncNode->pSyncRespMgr); syncRespMgrDestroy(pSyncNode->pSyncRespMgr);
pSyncNode->pSyncRespMgr = NULL; pSyncNode->pSyncRespMgr = NULL;
...@@ -2174,10 +2175,18 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) { ...@@ -2174,10 +2175,18 @@ static void syncNodeEqPeerHeartbeatTimer(void* param, void* tmrId) {
SSyncNode* pSyncNode = pData->pSyncNode; SSyncNode* pSyncNode = pData->pSyncNode;
SSyncTimer* pSyncTimer = pData->pTimer; SSyncTimer* pSyncTimer = pData->pTimer;
if (pSyncNode == NULL) {
return;
}
if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) { if (pSyncNode->state != TAOS_SYNC_STATE_LEADER) {
return; return;
} }
if (pSyncNode->pRaftStore == NULL) {
return;
}
// sNTrace(pSyncNode, "eq peer hb timer"); // sNTrace(pSyncNode, "eq peer hb timer");
int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock); int64_t timerLogicClock = atomic_load_64(&pSyncTimer->logicClock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册