Prevent deadlock on malloc() failure.

dev
Bartosz Szreder 2018-11-08 10:29:31 +01:00
parent f6eb12084d
commit 5c5c476338
1 changed files with 2 additions and 0 deletions

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;
}
}