Free lz4 decompression context to avoid leak

This commit is contained in:
Dana Powers
2017-03-09 11:08:48 -08:00
parent 218a9014b7
commit 23d1cc444d

View File

@@ -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.