Merge pull request #27601 from taosdata/fix/TD-31834-fix-use-after-free
fix/TD-31834-fix-use-after-free
This commit is contained in:
commit
cf592659ba
|
@ -3266,6 +3266,7 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) {
|
|||
sError("vgId:%d, cannot append an invalid client request with no msg head. type:%s, dataLen:%d", ths->vgId,
|
||||
TMSG_INFO(pEntry->originalRpcType), pEntry->dataLen);
|
||||
syncEntryDestroy(pEntry);
|
||||
pEntry = NULL;
|
||||
goto _out;
|
||||
}
|
||||
|
||||
|
@ -3274,6 +3275,7 @@ int32_t syncNodeAppend(SSyncNode* ths, SSyncRaftEntry* pEntry) {
|
|||
sError("vgId:%d, failed to enqueue sync log buffer, index:%" PRId64, ths->vgId, pEntry->index);
|
||||
(void)syncFsmExecute(ths, ths->pFsm, ths->state, raftStoreGetTerm(ths), pEntry, terrno, false);
|
||||
syncEntryDestroy(pEntry);
|
||||
pEntry = NULL;
|
||||
goto _out;
|
||||
}
|
||||
|
||||
|
@ -3282,7 +3284,8 @@ _out:;
|
|||
// proceed match index, with replicating on needed
|
||||
SyncIndex matchIndex = syncLogBufferProceed(ths->pLogBuf, ths, NULL, "Append");
|
||||
|
||||
sTrace("vgId:%d, append raft entry. index:%" PRId64 ", term:%" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64
|
||||
if(pEntry != NULL)
|
||||
sTrace("vgId:%d, append raft entry. index:%" PRId64 ", term:%" PRId64 " pBuf: [%" PRId64 " %" PRId64 " %" PRId64
|
||||
", %" PRId64 ")",
|
||||
ths->vgId, pEntry->index, pEntry->term, ths->pLogBuf->startIndex, ths->pLogBuf->commitIndex,
|
||||
ths->pLogBuf->matchIndex, ths->pLogBuf->endIndex);
|
||||
|
|
Loading…
Reference in New Issue