Skip to content

Commit

Permalink
Fix Parquet string column free
Browse files Browse the repository at this point in the history
In the Parquet string read code, delete was being
called when free should have been used, which was
causing address sanitizer issues.
  • Loading branch information
bmcdonald3 committed Apr 22, 2024
1 parent dfd9fe8 commit 1cb7dc5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ArrowFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2058,8 +2058,9 @@ int cpp_getNumRowGroups(int64_t readerIdx) {
}

void cpp_freeMapValues(void* row) {
auto curr = static_cast<parquet::ByteArray*>(row);
delete curr;
parquet::ByteArray* string_values =
static_cast<parquet::ByteArray*>row;
free(string_values);
globalColumnReaders.clear();
globalRowGroupReaders.clear();
globalFiles.clear();
Expand Down

0 comments on commit 1cb7dc5

Please sign in to comment.