fix : propagate custom allocator to ZSTDMT though ZSTD_CCtx_setParameter()

also : compile fuzzer with MT enabled
This commit is contained in:
Yann Collet
2017-07-10 14:02:33 -07:00
parent f9524cf366
commit 88da8f1816
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -377,7 +377,7 @@ size_t ZSTD_CCtx_setParameter(ZSTD_CCtx* cctx, ZSTD_cParameter param, unsigned v
return ERROR(compressionParameter_unsupported);
ZSTDMT_freeCCtx(cctx->mtctx);
cctx->nbThreads = 1;
cctx->mtctx = ZSTDMT_createCCtx(value);
cctx->mtctx = ZSTDMT_createCCtx_advanced(value, cctx->customMem);
if (cctx->mtctx == NULL) return ERROR(memory_allocation);
}
cctx->nbThreads = value;