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
64ff0e54
Commit
64ff0e54
authored
Apr 26, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
May 05, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Initialise the LPWITHREADERROR structure after it has been allocated.
parent
2bcfe8eb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
8 deletions
+22
-8
internet.c
dlls/wininet/internet.c
+22
-8
No files found.
dlls/wininet/internet.c
View file @
64ff0e54
...
...
@@ -3045,6 +3045,26 @@ HINTERNET WINAPI InternetOpenUrlA(HINTERNET hInternet, LPCSTR lpszUrl,
}
static
LPWITHREADERROR
INTERNET_AllocThreadError
(
void
)
{
LPWITHREADERROR
lpwite
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
lpwite
));
if
(
lpwite
)
{
lpwite
->
dwError
=
0
;
lpwite
->
response
[
0
]
=
'\0'
;
}
if
(
!
TlsSetValue
(
g_dwTlsErrIndex
,
lpwite
))
{
HeapFree
(
GetProcessHeap
(),
0
,
lpwite
);
return
NULL
;
}
return
lpwite
;
}
/***********************************************************************
* INTERNET_SetLastError (internal)
*
...
...
@@ -3058,10 +3078,7 @@ void INTERNET_SetLastError(DWORD dwError)
LPWITHREADERROR
lpwite
=
(
LPWITHREADERROR
)
TlsGetValue
(
g_dwTlsErrIndex
);
if
(
!
lpwite
)
{
lpwite
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
lpwite
));
TlsSetValue
(
g_dwTlsErrIndex
,
lpwite
);
}
lpwite
=
INTERNET_AllocThreadError
();
SetLastError
(
dwError
);
if
(
lpwite
)
...
...
@@ -3493,10 +3510,7 @@ LPSTR INTERNET_GetResponseBuffer(void)
{
LPWITHREADERROR
lpwite
=
(
LPWITHREADERROR
)
TlsGetValue
(
g_dwTlsErrIndex
);
if
(
!
lpwite
)
{
lpwite
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
lpwite
));
TlsSetValue
(
g_dwTlsErrIndex
,
lpwite
);
}
lpwite
=
INTERNET_AllocThreadError
();
TRACE
(
"
\n
"
);
return
lpwite
->
response
;
}
...
...
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