summaryrefslogtreecommitdiffstats
path: root/lz4frame.c
diff options
context:
space:
mode:
authorYann Collet <yann.collet.73@gmail.com>2014-09-07 12:29:04 (GMT)
committerYann Collet <yann.collet.73@gmail.com>2014-09-07 12:29:04 (GMT)
commitd1f479fe3af5ff35431f1c3a0dc1fcbcd7071839 (patch)
treea9e534ca492e79277d713e72375cf0a25268fb57 /lz4frame.c
parentd1d1f8835de315ce401c8d1309ba648539878a64 (diff)
downloadlz4-d1f479fe3af5ff35431f1c3a0dc1fcbcd7071839.zip
lz4-d1f479fe3af5ff35431f1c3a0dc1fcbcd7071839.tar.gz
lz4-d1f479fe3af5ff35431f1c3a0dc1fcbcd7071839.tar.bz2
minor allocation correction (compressBegin)
Diffstat (limited to 'lz4frame.c')
-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;
}