This is an automated email from the ASF dual-hosted git repository. jackietien pushed a commit to branch iotdb in repository https://gitbox.apache.org/repos/asf/tsfile.git
commit c19847fe6644fd0e26970266a2c8eafe8324dc76 Author: Hongzhi Gao <[email protected]> AuthorDate: Tue Jun 18 11:33:11 2024 +0800 Fix SimpleListNode::remove (#117) --- cpp/src/common/container/list.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/src/common/container/list.h b/cpp/src/common/container/list.h index 271b9881..88a73379 100644 --- a/cpp/src/common/container/list.h +++ b/cpp/src/common/container/list.h @@ -119,10 +119,11 @@ class SimpleList { while (cur && cur->data_ != target) { cur = cur->next_; } - if (cur) { + if (!cur) { return common::E_NOT_EXIST; } prev->next_ = cur->next_; + size_--; // cur is allocated from PageArena, it should not reclaim now return common::E_OK; }
