Commit d5a2698b authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

Make sure that newly allocated TLS indexes are cleared.

parent b2059fa4
...@@ -1502,6 +1502,7 @@ DWORD WINAPI TlsAlloc( void ) ...@@ -1502,6 +1502,7 @@ DWORD WINAPI TlsAlloc( void )
for (i = 0, mask = 1; i < 32; i++, mask <<= 1) if (!(*bits & mask)) break; for (i = 0, mask = 1; i < 32; i++, mask <<= 1) if (!(*bits & mask)) break;
*bits |= mask; *bits |= mask;
RtlReleasePebLock(); RtlReleasePebLock();
NtCurrentTeb()->tls_array[ret+i] = 0; /* clear the value */
return ret + i; return ret + i;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment