diff --git a/src/braft/replicator.cpp b/src/braft/replicator.cpp index f2e2bb5c..cb3b75ec 100644 --- a/src/braft/replicator.cpp +++ b/src/braft/replicator.cpp @@ -610,6 +610,7 @@ int Replicator::_prepare_entry(int offset, EntryMeta* em, butil::IOBuf *data) { // until the replicator leave readonly mode. if (_readonly_index != 0 && log_index >= _readonly_index) { if (entry->type != ENTRY_TYPE_CONFIGURATION) { + entry->Release(); return EREADONLY; } _readonly_index = log_index + 1;