Now clear the link->cache_ptr after closing the cache

This commit is contained in:
Fufu Fang 2021-09-02 16:24:55 +01:00
parent b96ed88bec
commit d7086c6ecf
1 changed files with 2 additions and 0 deletions

View File

@ -897,6 +897,8 @@ void Cache_close(Cache * cf)
lprintf(error, "cannot close data file %s.\n", strerror(errno));
}
cf->link->cache_ptr = NULL;
lprintf(cache_lock_debug,
"thread %x: unlocking cf_lock;\n", pthread_self());
PTHREAD_MUTEX_UNLOCK(&cf_lock);