From 2a85ba50fe2af3e8633da0fbb8fcfa801d96e39c Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Thu, 9 May 2019 14:17:11 +0200 Subject: [PATCH] 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 --- compat/win32/fscache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compat/win32/fscache.c b/compat/win32/fscache.c index f1d885c6d8..fea0b47da8 100644 --- a/compat/win32/fscache.c +++ b/compat/win32/fscache.c @@ -454,8 +454,10 @@ int fscache_enable(size_t initial_size) if (!initialized) { if (!dwTlsIndex) { dwTlsIndex = TlsAlloc(); - if (dwTlsIndex == TLS_OUT_OF_INDEXES) + if (dwTlsIndex == TLS_OUT_OF_INDEXES) { + LeaveCriticalSection(&fscache_cs); return 0; + } } /* redirect opendir and lstat to the fscache implementations */