Paul Gofman : ntdll: Zero all FLS slots instances in RtlFlsFree().
Alexandre Julliard
julliard at winehq.org
Tue Oct 13 15:42:05 CDT 2020
Module: wine
Branch: master
Commit: 7341f4ad1e771f32d8276734774bfa9ba352f259
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7341f4ad1e771f32d8276734774bfa9ba352f259
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Fri Oct 9 05:51:26 2020 +0300
ntdll: Zero all FLS slots instances in RtlFlsFree().
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/thread.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index cf6bddab0b..95511391d3 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -392,7 +392,7 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
{
unsigned int chunk_index, idx;
FLS_INFO_CHUNK *chunk;
- TEB_FLS_DATA *fls;
+ LIST_ENTRY *entry;
lock_fls_data();
@@ -410,10 +410,15 @@ NTSTATUS WINAPI DECLSPEC_HOTPATCH RtlFlsFree( ULONG index )
return STATUS_INVALID_PARAMETER;
}
- if ((fls = NtCurrentTeb()->FlsSlots) && fls->fls_data_chunks[chunk_index])
+ for (entry = fls_data.fls_list_head.Flink; entry != &fls_data.fls_list_head; entry = entry->Flink)
{
- /* FIXME: call Fls callback */
- fls->fls_data_chunks[chunk_index][idx + 1] = NULL;
+ TEB_FLS_DATA *fls = CONTAINING_RECORD(entry, TEB_FLS_DATA, fls_list_entry);
+
+ if (fls->fls_data_chunks[chunk_index])
+ {
+ /* FIXME: call Fls callback */
+ fls->fls_data_chunks[chunk_index][idx + 1] = NULL;
+ }
}
--chunk->count;
More information about the wine-cvs
mailing list