summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lz4frame.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lz4frame.c b/lz4frame.c
index eaa8408..91d278b 100644
--- a/lz4frame.c
+++ b/lz4frame.c
@@ -354,6 +354,7 @@ size_t LZ4F_compressBegin(LZ4F_compressionContext_t compressionContext, void* ds
if (cctxPtr->maxBufferSize < cctxPtr->maxBlockSize)
{
cctxPtr->maxBufferSize = cctxPtr->maxBlockSize;
+ FREEMEM(cctxPtr->tmpIn);
cctxPtr->tmpIn = ALLOCATOR(cctxPtr->maxBlockSize);
if (cctxPtr->tmpIn == NULL) return -ERROR_allocation_failed;
}