Skip to content

Commit

Permalink
[VL] Fix: close QAT codec correctly (#3840)
Browse files Browse the repository at this point in the history
Some of the inner structures of qzSession_ are not released without calling qzTeardownSession.
  • Loading branch information
marin-ma authored Nov 24, 2023
1 parent 0088054 commit f456a7e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cpp/core/utils/qat/QatCodec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ class QatZipCodec : public arrow::util::Codec {
protected:
explicit QatZipCodec(int compressionLevel) : compressionLevel_(compressionLevel) {}

~QatZipCodec() {
(void)qzTeardownSession(&qzSession_);
(void)qzClose(&qzSession_);
}

arrow::Result<int64_t> Decompress(int64_t inputLen, const uint8_t* input, int64_t outputLen, uint8_t* output)
override {
uint32_t compressedSize = static_cast<uint32_t>(inputLen);
Expand Down

0 comments on commit f456a7e

Please sign in to comment.