diff --git a/be/src/olap/rowset/segment_v2/inverted_index/query/conjunction_query.cpp b/be/src/olap/rowset/segment_v2/inverted_index/query/conjunction_query.cpp index c5793f93f06136..b77edc79ade905 100644 --- a/be/src/olap/rowset/segment_v2/inverted_index/query/conjunction_query.cpp +++ b/be/src/olap/rowset/segment_v2/inverted_index/query/conjunction_query.cpp @@ -25,16 +25,16 @@ ConjunctionQuery::ConjunctionQuery(IndexReader* reader) : _reader(reader), _index_version(reader->getIndexVersion()) {} ConjunctionQuery::~ConjunctionQuery() { - for (auto& term : _terms) { - if (term) { - _CLDELETE(term); - } - } for (auto& term_doc : _term_docs) { if (term_doc) { _CLDELETE(term_doc); } } + for (auto& term : _terms) { + if (term) { + _CLDELETE(term); + } + } } void ConjunctionQuery::add(const std::wstring& field_name, const std::vector& terms) {