Skip to content

Commit

Permalink
set nullptr after free
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby committed Dec 20, 2024
1 parent 333f13e commit 6a63aa3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/core/thirdparty/tantivy/tantivy-wrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,12 @@ struct TantivyIndexWrapper {
free() {
if (writer_ != nullptr) {
tantivy_free_index_writer(writer_);
writer_ = nullptr;
}

if (reader_ != nullptr) {
tantivy_free_index_reader(reader_);
reader_ = nullptr;
}
}

Expand Down

0 comments on commit 6a63aa3

Please sign in to comment.