Merge pull request #1408 from szreder/dev

Prevent deadlock on malloc() failure.
This commit is contained in:
Yann Collet 2018-11-08 10:43:40 -08:00 committed by GitHub
commit 5b598bb203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -868,6 +868,8 @@ void COVER_best_finish(COVER_best_t *best, size_t compressedSize,
if (!best->dict) {
best->compressedSize = ERROR(GENERIC);
best->dictSize = 0;
ZSTD_pthread_cond_signal(&best->cond);
ZSTD_pthread_mutex_unlock(&best->mutex);
return;
}
}