mirror of
https://github.com/typesense/typesense.git
synced 2025-05-22 23:06:30 +08:00
Fix ASAN issues.
This commit is contained in:
parent
61357fff93
commit
eb298ff9a0
@ -417,7 +417,7 @@ Option<nlohmann::json> Collection::update_matching_filter(const std::string& fil
|
||||
}
|
||||
|
||||
const auto& dirty_values = parse_dirty_values_option(req_dirty_values);
|
||||
size_t docs_updated_count;
|
||||
size_t docs_updated_count = 0;
|
||||
nlohmann::json update_document, dummy;
|
||||
|
||||
try {
|
||||
|
@ -423,7 +423,7 @@ TEST_F(FilterTest, FilterTreeIterator) {
|
||||
}
|
||||
ASSERT_FALSE(iter_to_array_test.is_valid);
|
||||
|
||||
delete filter_ids;
|
||||
delete[] filter_ids;
|
||||
|
||||
auto iter_and_scalar_test = filter_result_iterator_t(coll->get_name(), coll->_get_index(), filter_tree_root);
|
||||
ASSERT_TRUE(iter_and_scalar_test.init_status().ok());
|
||||
@ -440,7 +440,7 @@ TEST_F(FilterTest, FilterTreeIterator) {
|
||||
}
|
||||
ASSERT_FALSE(iter_and_scalar_test.is_valid);
|
||||
|
||||
delete and_result;
|
||||
delete[] and_result;
|
||||
delete filter_tree_root;
|
||||
|
||||
doc = R"({
|
||||
@ -491,6 +491,7 @@ TEST_F(FilterTest, FilterTreeIterator) {
|
||||
phrase_ids[i] = i * 2;
|
||||
}
|
||||
filter_result_iterator_t::add_phrase_ids(iter_add_phrase_ids_test, phrase_ids, 4);
|
||||
filter_iter_guard.release();
|
||||
filter_iter_guard.reset(iter_add_phrase_ids_test);
|
||||
|
||||
ASSERT_TRUE(iter_add_phrase_ids_test->is_valid);
|
||||
|
Loading…
x
Reference in New Issue
Block a user