Skip to content

Commit 3b899de

Browse files
committed
Free lz4 decompression context to avoid leak
1 parent e775e05 commit 3b899de

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kafka/codec.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ def lz4_decode(payload):
192192
# pylint: disable-msg=no-member
193193
ctx = lz4f.createDecompContext()
194194
data = lz4f.decompressFrame(payload, ctx)
195+
lz4f.freeDecompContext(ctx)
195196

196197
# lz4f python module does not expose how much of the payload was
197198
# actually read if the decompression was only partial.

0 commit comments

Comments
 (0)