mirror of
https://github.com/typesense/typesense.git
synced 2025-05-23 15:23:40 +08:00
Fix memory leak.
This commit is contained in:
parent
a749d83401
commit
25c9eba1a5
@ -1724,10 +1724,7 @@ int art_fuzzy_search_i(art_tree *t, const unsigned char *term, const int term_le
|
||||
<< ", filter_ids_length: " << filter_ids_length;
|
||||
}*/
|
||||
|
||||
// TODO: Figure out this edge case.
|
||||
// if(allowed_doc_ids != filter_ids) {
|
||||
// delete [] allowed_doc_ids;
|
||||
// }
|
||||
delete [] allowed_doc_ids;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -1267,7 +1267,7 @@ bool posting_list_t::has_exact_match(std::vector<posting_list_t::iterator_t>& po
|
||||
} else {
|
||||
|
||||
if (!field_is_array) {
|
||||
for (uint32_t i = posting_list_iterators.size() - 1; i >= 0; i--) {
|
||||
for (int i = posting_list_iterators.size() - 1; i >= 0; i--) {
|
||||
posting_list_t::iterator_t& it = posting_list_iterators[i];
|
||||
|
||||
block_t* curr_block = it.block();
|
||||
@ -1320,7 +1320,7 @@ bool posting_list_t::has_exact_match(std::vector<posting_list_t::iterator_t>& po
|
||||
|
||||
std::map<size_t, token_index_meta_t> array_index_to_token_index;
|
||||
|
||||
for(uint32_t i = posting_list_iterators.size() - 1; i >= 0; i--) {
|
||||
for(int i = posting_list_iterators.size() - 1; i >= 0; i--) {
|
||||
posting_list_t::iterator_t& it = posting_list_iterators[i];
|
||||
|
||||
block_t* curr_block = it.block();
|
||||
|
Loading…
x
Reference in New Issue
Block a user