This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 7be35f88d16 [bugfix](memleak) fix memleak introduced by struct column
schema change (#51771)
7be35f88d16 is described below
commit 7be35f88d1678c5f6dd5406b4903e2b7d153e129
Author: yiguolei <[email protected]>
AuthorDate: Tue Jun 17 09:52:11 2025 +0800
[bugfix](memleak) fix memleak introduced by struct column schema change
(#51771)
### What problem does this PR solve?
introduced by PR https://github.com/apache/doris/pull/47096
---
be/src/olap/rowset/segment_v2/column_reader.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/be/src/olap/rowset/segment_v2/column_reader.cpp
b/be/src/olap/rowset/segment_v2/column_reader.cpp
index ec8066236c7..59368599c1a 100644
--- a/be/src/olap/rowset/segment_v2/column_reader.cpp
+++ b/be/src/olap/rowset/segment_v2/column_reader.cpp
@@ -805,9 +805,10 @@ Status ColumnReader::new_struct_iterator(ColumnIterator**
iterator,
// create default_iterator for schema-change behavior which increase column
for (size_t i = child_size; i < tablet_column_size; i++) {
TabletColumn column = tablet_column->get_sub_column(i);
- std::unique_ptr<ColumnIterator>* it = new
std::unique_ptr<ColumnIterator>();
- RETURN_IF_ERROR(Segment::new_default_iterator(column, it));
- sub_column_iterators.push_back(it->get());
+ std::unique_ptr<ColumnIterator> it;
+ RETURN_IF_ERROR(Segment::new_default_iterator(column, &it));
+ sub_column_iterators.push_back(it.get());
+ it.release();
}
ColumnIterator* null_iterator = nullptr;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]