diff options
| author | Dana Powers <dana.powers@gmail.com> | 2017-03-09 11:08:48 -0800 |
|---|---|---|
| committer | Dana Powers <dana.powers@gmail.com> | 2017-03-09 11:08:48 -0800 |
| commit | 23d1cc444d16ddd58c9fec82f8a6f4331fed46dc (patch) | |
| tree | 47c59ba51e25c72b0e23e733628f805b2023a905 | |
| parent | 218a9014b749e52a2b8d40da6e3443c8132b8fa1 (diff) | |
| download | kafka-python-23d1cc444d16ddd58c9fec82f8a6f4331fed46dc.tar.gz | |
Free lz4 decompression context to avoid leak
| -rw-r--r-- | kafka/codec.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kafka/codec.py b/kafka/codec.py index 1e57107..4deec49 100644 --- a/kafka/codec.py +++ b/kafka/codec.py @@ -192,6 +192,7 @@ def lz4_decode(payload): # pylint: disable-msg=no-member ctx = lz4f.createDecompContext() data = lz4f.decompressFrame(payload, ctx) + lz4f.freeDecompContext(ctx) # lz4f python module does not expose how much of the payload was # actually read if the decompression was only partial. |
