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
1a53e28c
Commit
1a53e28c
authored
Feb 06, 2024
by
Piotr Caban
Committed by
Alexandre Julliard
Feb 12, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't allocate global_proxy structure dynamically.
parent
c17b0d6a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
23 deletions
+16
-23
internet.c
dlls/wininet/internet.c
+16
-23
No files found.
dlls/wininet/internet.c
View file @
1a53e28c
...
...
@@ -472,16 +472,13 @@ static void FreeProxyInfo( proxyinfo_t *lpwpi )
free
(
lpwpi
->
proxyPassword
);
}
static
proxyinfo_t
*
global_proxy
;
static
proxyinfo_t
global_proxy
;
static
void
free_global_proxy
(
void
)
{
EnterCriticalSection
(
&
WININET_cs
);
if
(
global_proxy
)
{
FreeProxyInfo
(
global_proxy
);
free
(
global_proxy
);
}
FreeProxyInfo
(
&
global_proxy
);
memset
(
&
global_proxy
,
0
,
sizeof
(
global_proxy
)
);
LeaveCriticalSection
(
&
WININET_cs
);
}
...
...
@@ -542,11 +539,11 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
memset
(
lpwpi
,
0
,
sizeof
(
*
lpwpi
)
);
EnterCriticalSection
(
&
WININET_cs
);
if
(
global_proxy
)
if
(
global_proxy
.
flags
)
{
lpwpi
->
flags
=
global_proxy
->
flags
;
lpwpi
->
proxy
=
wcsdup
(
global_proxy
->
proxy
);
lpwpi
->
proxyBypass
=
wcsdup
(
global_proxy
->
proxyBypass
);
lpwpi
->
flags
=
global_proxy
.
flags
;
lpwpi
->
proxy
=
wcsdup
(
global_proxy
.
proxy
);
lpwpi
->
proxyBypass
=
wcsdup
(
global_proxy
.
proxyBypass
);
}
LeaveCriticalSection
(
&
WININET_cs
);
...
...
@@ -3024,20 +3021,16 @@ BOOL WINAPI InternetSetOptionW(HINTERNET hInternet, DWORD dwOption,
{
EnterCriticalSection
(
&
WININET_cs
);
free_global_proxy
();
global_proxy
=
malloc
(
sizeof
(
proxyinfo_t
));
if
(
global_proxy
)
if
(
info
->
dwAccessType
==
INTERNET_OPEN_TYPE_PROXY
)
{
if
(
info
->
dwAccessType
==
INTERNET_OPEN_TYPE_PROXY
)
{
global_proxy
->
flags
=
PROXY_TYPE_PROXY
;
global_proxy
->
proxy
=
wcsdup
(
info
->
lpszProxy
);
global_proxy
->
proxyBypass
=
wcsdup
(
info
->
lpszProxyBypass
);
}
else
{
global_proxy
->
flags
=
PROXY_TYPE_DIRECT
;
global_proxy
->
proxy
=
global_proxy
->
proxyBypass
=
NULL
;
}
global_proxy
.
flags
=
PROXY_TYPE_PROXY
;
global_proxy
.
proxy
=
wcsdup
(
info
->
lpszProxy
);
global_proxy
.
proxyBypass
=
wcsdup
(
info
->
lpszProxyBypass
);
}
else
{
global_proxy
.
flags
=
PROXY_TYPE_DIRECT
;
global_proxy
.
proxy
=
global_proxy
.
proxyBypass
=
NULL
;
}
LeaveCriticalSection
(
&
WININET_cs
);
}
...
...
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