memory leak
This commit is contained in:
parent
8062d603b7
commit
154bc177a7
|
@ -638,7 +638,8 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm
|
||||||
pEntry->index, pEntry->term, role, currentTerm);
|
pEntry->index, pEntry->term, role, currentTerm);
|
||||||
|
|
||||||
pNextEntry = syncLogBufferGetOneEntry(pBuf, pNode, index + 1, &nextInBuf);
|
pNextEntry = syncLogBufferGetOneEntry(pBuf, pNode, index + 1, &nextInBuf);
|
||||||
if (pNextEntry != NULL && pNextEntry->originalRpcType == TDMT_SYNC_CONFIG_CHANGE) {
|
if (pNextEntry != NULL) {
|
||||||
|
if(pNextEntry->originalRpcType == TDMT_SYNC_CONFIG_CHANGE){
|
||||||
sInfo("vgId:%d, to change config at Commit. "
|
sInfo("vgId:%d, to change config at Commit. "
|
||||||
"current entry, index:%" PRId64 ", term:%" PRId64", "
|
"current entry, index:%" PRId64 ", term:%" PRId64", "
|
||||||
"node, role:%d, current term:%" PRId64 ", restore:%d, "
|
"node, role:%d, current term:%" PRId64 ", restore:%d, "
|
||||||
|
@ -670,7 +671,7 @@ int32_t syncLogBufferCommit(SSyncLogBuffer* pBuf, SSyncNode* pNode, int64_t comm
|
||||||
sTrace("vgId:%d, committed index:%" PRId64 ", term:%" PRId64 ", role:%d, current term:%" PRId64 "", pNode->vgId,
|
sTrace("vgId:%d, committed index:%" PRId64 ", term:%" PRId64 ", role:%d, current term:%" PRId64 "", pNode->vgId,
|
||||||
pNextEntry->index, pNextEntry->term, role, currentTerm);
|
pNextEntry->index, pNextEntry->term, role, currentTerm);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (!nextInBuf) {
|
if (!nextInBuf) {
|
||||||
syncEntryDestroy(pNextEntry);
|
syncEntryDestroy(pNextEntry);
|
||||||
pNextEntry = NULL;
|
pNextEntry = NULL;
|
||||||
|
|
Loading…
Reference in New Issue