Make sure that newly allocated TLS indexes are cleared.
This commit is contained in:
parent
b2059fa4c0
commit
d5a2698b8f
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue