Skip to content

Commit

Permalink
cache: fix pfree valueBuffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-v-kush authored Dec 18, 2024
1 parent 063eb72 commit fcc3292
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions columnar/src/backend/columnar/columnar_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1955,8 +1955,15 @@ DeserializeChunkData(StripeBuffers *stripeBuffers, uint64 chunkIndex,
attributeForm->attlen, attributeForm->attalign,
chunkData->valueArray[columnIndex]);

/* store current chunk's data buffer to be freed at next chunk read */
chunkData->valueBufferArray[columnIndex] = valueBuffer;
if(shouldCache)
{
/* store current chunk's data buffer to be freed at next chunk read */
chunkData->valueBufferArray[columnIndex] = NULL;
}
else
{
chunkData->valueBufferArray[columnIndex] = valueBuffer;
}
}
else if (columnAdded)
{
Expand Down

0 comments on commit fcc3292

Please sign in to comment.