mirror of
https://github.com/typesense/typesense.git
synced 2025-05-21 06:02:26 +08:00
Fix valgrind warnings.
This commit is contained in:
parent
2317c6adb0
commit
910256d82c
@ -1326,7 +1326,7 @@ uint32_t Index::do_filtering(uint32_t** filter_ids_out, const std::vector<filter
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t* excluded_strt_ids = new uint32_t[strt_ids_size];
|
||||
uint32_t* excluded_strt_ids = nullptr;
|
||||
size_t excluded_strt_size = 0;
|
||||
excluded_strt_size = ArrayUtils::exclude_scalar(ids, ids_size, strt_ids,
|
||||
strt_ids_size, &excluded_strt_ids);
|
||||
@ -1338,7 +1338,7 @@ uint32_t Index::do_filtering(uint32_t** filter_ids_out, const std::vector<filter
|
||||
|
||||
ids = excluded_strt_ids;
|
||||
ids_size = excluded_strt_size;
|
||||
|
||||
delete[] strt_ids;
|
||||
} else {
|
||||
// Otherwise, we just ensure that given record contains tokens in the filter query
|
||||
uint32_t* out = nullptr;
|
||||
|
@ -549,6 +549,7 @@ TEST_F(CollectionManagerTest, Symlinking) {
|
||||
|
||||
TEST_F(CollectionManagerTest, LoadMultipleCollections) {
|
||||
// to prevent fixture tear down from running as we are fudging with CollectionManager singleton
|
||||
collectionManager.dispose();
|
||||
delete store;
|
||||
store = nullptr;
|
||||
|
||||
|
@ -1338,6 +1338,9 @@ TEST_F(PostingListTest, CompactToFullPostingListConversion) {
|
||||
|
||||
ASSERT_EQ(4, c1->num_ids());
|
||||
ASSERT_EQ(4, p1->num_ids());
|
||||
|
||||
free(c1);
|
||||
delete p1;
|
||||
}
|
||||
|
||||
TEST_F(PostingListTest, BlockIntersectionOnMixedLists) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user