Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
08d8a5ea
Commit
08d8a5ea
authored
May 24, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
May 25, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use TLS_OUT_OF_INDEXES as invalid TLS value.
parent
bb4168ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
urlmon_main.c
dlls/urlmon/urlmon_main.c
+8
-5
No files found.
dlls/urlmon/urlmon_main.c
View file @
08d8a5ea
...
...
@@ -36,7 +36,7 @@ LONG URLMON_refCount = 0;
HINSTANCE
URLMON_hInstance
=
0
;
static
HMODULE
hCabinet
=
NULL
;
static
DWORD
urlmon_tls
;
static
DWORD
urlmon_tls
=
TLS_OUT_OF_INDEXES
;
static
void
init_session
(
BOOL
);
...
...
@@ -56,9 +56,12 @@ tls_data_t *get_tls_data(void)
{
tls_data_t
*
data
;
if
(
!
urlmon_tls
)
{
if
(
urlmon_tls
==
TLS_OUT_OF_INDEXES
)
{
DWORD
tls
=
TlsAlloc
();
tls
=
InterlockedCompareExchange
((
LONG
*
)
&
urlmon_tls
,
tls
,
0
);
if
(
tls
==
TLS_OUT_OF_INDEXES
)
return
NULL
;
tls
=
InterlockedCompareExchange
((
LONG
*
)
&
urlmon_tls
,
tls
,
TLS_OUT_OF_INDEXES
);
if
(
tls
!=
urlmon_tls
)
TlsFree
(
tls
);
}
...
...
@@ -83,7 +86,7 @@ static void free_tls_list(void)
{
tls_data_t
*
data
;
if
(
!
urlmon_tls
)
if
(
urlmon_tls
==
TLS_OUT_OF_INDEXES
)
return
;
while
(
!
list_empty
(
&
tls_list
))
{
...
...
@@ -99,7 +102,7 @@ static void detach_thread(void)
{
tls_data_t
*
data
;
if
(
!
urlmon_tls
)
if
(
urlmon_tls
==
TLS_OUT_OF_INDEXES
)
return
;
data
=
TlsGetValue
(
urlmon_tls
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment