fixed: deallocation of structures in case of error in ZBUFF_createCCtx and ZBUFF_createDCtx

This commit is contained in:
inikep committed 2016-06-03 16:36:50 +02:00
1 parent f040be9850
commit 3640396b1a
5 files changed
+11 -11

No files matched your search

+1
View File
@@ -172,6 +172,7 @@ ZSTD_DCtx* ZSTD_createDCtx(void)
size_t ZSTD_freeDCtx(ZSTD_DCtx* dctx)
{
if (dctx==NULL) return 0; /* support free on NULL */
dctx->customMem.customFree(dctx->customMem.opaque, dctx);
return 0; /* reserved as a potential error code in the future */
}