Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix possible temporary cache entry corruption
If for some reason the cache queue lock couldn't be locked, the created entry would remain in the hash table. This could potentially lead to two threads obtaining a reference to this temporary entry, and calling cache_entry_unref() on it, leading to double frees and other nasty problems. It's very unlikely that this condition will happen, as pthread_rwlock_wrlock() should fail only when a dead lock would occur. Reported by immerse
- Loading branch information