From 5076aa3e352ecbd67cd71314cb1fafcb319aed56 Mon Sep 17 00:00:00 2001 From: "W. Felix Handte" Date: Fri, 27 Apr 2018 13:59:02 -0400 Subject: Remove Redundant LZ4_resetStream() Call --- lib/lz4frame.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/lz4frame.c b/lib/lz4frame.c index e2be990..c4e0ae0 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -457,7 +457,7 @@ struct LZ4F_CDict_s { LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize) { const char* dictStart = (const char*)dictBuffer; - LZ4F_CDict* cdict = (LZ4F_CDict*) malloc(sizeof(*cdict)); + LZ4F_CDict* cdict = (LZ4F_CDict*) ALLOC(sizeof(*cdict)); if (!cdict) return NULL; if (dictSize > 64 KB) { dictStart += dictSize - 64 KB; @@ -471,7 +471,6 @@ LZ4F_CDict* LZ4F_createCDict(const void* dictBuffer, size_t dictSize) return NULL; } memcpy(cdict->dictContent, dictStart, dictSize); - LZ4_resetStream(cdict->fastCtx); LZ4_loadDict (cdict->fastCtx, (const char*)cdict->dictContent, (int)dictSize); LZ4_resetStreamHC(cdict->HCCtx, LZ4HC_CLEVEL_DEFAULT); LZ4_loadDictHC(cdict->HCCtx, (const char*)cdict->dictContent, (int)dictSize); -- cgit v0.12