Free lz4 decompression context to avoid leak

This commit is contained in:
Dana Powers 2017-03-09 11:08:48 -08:00
parent e775e05d65
commit 3b899decb8
1 changed files with 1 additions and 0 deletions

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.