Skip to content

Commit 2a85ba5

Browse files
committed
fixup! fscache: update fscache to be thread specific instead of global
We do fall back to not enabling the FSCache when we're out of Thread-Local indexes, but we failed to unlock the mutex. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 0ccd8ca commit 2a85ba5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compat/win32/fscache.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,10 @@ int fscache_enable(size_t initial_size)
454454
if (!initialized) {
455455
if (!dwTlsIndex) {
456456
dwTlsIndex = TlsAlloc();
457-
if (dwTlsIndex == TLS_OUT_OF_INDEXES)
457+
if (dwTlsIndex == TLS_OUT_OF_INDEXES) {
458+
LeaveCriticalSection(&fscache_cs);
458459
return 0;
460+
}
459461
}
460462

461463
/* redirect opendir and lstat to the fscache implementations */

0 commit comments

Comments
 (0)