]> git.ipfire.org Git - thirdparty/zstd.git/commit
zstdmt : correctly check for cctx and buffer allocation
authorYann Collet <cyan@fb.com>
Thu, 12 Jan 2017 01:01:28 +0000 (02:01 +0100)
committerYann Collet <cyan@fb.com>
Thu, 12 Jan 2017 01:01:28 +0000 (02:01 +0100)
commitb05c4828eaf67fce7d2be9ef70a53591351b9ec8
treed189c4f9cef12d9d02394ce926505fcf62482bdf
parent107bcbbbc23c73e8d48f066adc8959af690c0b12
zstdmt : correctly check for cctx and buffer allocation

Result from getBuffer and getCCtx could be NULL when allocation fails.
Now correctly checks : job creation stop and last job reports an allocation error.
releaseBuffer and releaseCCtx are now also compatible with NULL input.

Identified a new potential issue :
when early job fails, later jobs are not collected for resource retrieval.
lib/compress/zstd_compress.c
lib/compress/zstdmt_compress.c