Make sure that newly allocated TLS indexes are cleared.

This commit is contained in:
Aric Stewart 2001-10-03 18:40:10 +00:00 committed by Alexandre Julliard
parent b2059fa4c0
commit d5a2698b8f
1 changed files with 1 additions and 0 deletions

View File

@ -1502,6 +1502,7 @@ DWORD WINAPI TlsAlloc( void )
for (i = 0, mask = 1; i < 32; i++, mask <<= 1) if (!(*bits & mask)) break;
*bits |= mask;
RtlReleasePebLock();
NtCurrentTeb()->tls_array[ret+i] = 0; /* clear the value */
return ret + i;
}