Skip to content

Commit

Permalink
Add debug message for Cache_free()
Browse files Browse the repository at this point in the history
This is related to
#174
  • Loading branch information
fangfufu committed Nov 23, 2024
1 parent c85c065 commit adac52c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,19 +553,19 @@ static Cache *Cache_alloc(void)
static void Cache_free(Cache *cf)
{
if (pthread_mutex_destroy(&cf->seek_lock)) {
lprintf(fatal, "could not destroy seek_lock!\n");
lprintf(fatal, "could not destroy seek_lock: %s!\n", strerror(errno));
}

if (pthread_mutex_destroy(&cf->w_lock)) {
lprintf(fatal, "could not destroy w_lock!\n");
lprintf(fatal, "could not destroy w_lock: %s!\n", strerror(errno));
}

if (pthread_mutex_destroy(&cf->bgt_lock)) {
lprintf(fatal, "could not destroy bgt_lock!\n");
lprintf(fatal, "could not destroy bgt_lock: %s!\n", strerror(errno));
}

if (pthread_mutexattr_destroy(&cf->bgt_lock_attr)) {
lprintf(fatal, "could not destroy bgt_lock_attr!\n");
lprintf(fatal, "could not destroy bgt_lock_attr: %s!\n", strerror(errno));
}

if (cf->path) {
Expand Down

0 comments on commit adac52c

Please sign in to comment.