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
81a5a8f4
Commit
81a5a8f4
authored
Aug 16, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Aug 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
inetcpl: Use CRT allocation functions.
parent
64d9d63f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
13 deletions
+11
-13
connections.c
dlls/inetcpl.cpl/connections.c
+5
-6
security.c
dlls/inetcpl.cpl/security.c
+6
-7
No files found.
dlls/inetcpl.cpl/connections.c
View file @
81a5a8f4
...
...
@@ -27,7 +27,6 @@
#include "inetcpl.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
inetcpl
);
...
...
@@ -83,7 +82,7 @@ static DWORD create_connection_settings(BOOL manual_proxy, const WCHAR *proxy_se
pac_url_len
=
0
;
size
+=
sizeof
(
DWORD
)
*
10
;
*
ret
=
heap_alloc_zero
(
size
);
*
ret
=
calloc
(
1
,
size
);
if
(
!*
ret
)
return
0
;
(
*
ret
)
->
version
=
CONNECTION_SETTINGS_VERSION
;
...
...
@@ -152,11 +151,11 @@ static void connections_on_initdialog(HWND hwnd)
while
((
res
=
RegQueryValueExW
(
con
,
L"DefaultConnectionSettings"
,
NULL
,
&
type
,
(
BYTE
*
)
settings
,
&
size
))
==
ERROR_MORE_DATA
||
!
settings
)
{
connection_settings
*
new_settings
=
heap_
realloc
(
settings
,
size
);
connection_settings
*
new_settings
=
realloc
(
settings
,
size
);
if
(
!
new_settings
)
{
RegCloseKey
(
con
);
heap_
free
(
settings
);
free
(
settings
);
return
;
}
settings
=
new_settings
;
...
...
@@ -170,7 +169,7 @@ static void connections_on_initdialog(HWND hwnd)
else
if
(
settings
->
flags
&
CONNECTION_SETTINGS_WPAD
)
CheckDlgButton
(
hwnd
,
IDC_USE_WPAD
,
BST_CHECKED
);
}
heap_
free
(
settings
);
free
(
settings
);
}
TRACE
(
"ProxyEnable = %lx
\n
"
,
enabled
);
...
...
@@ -332,7 +331,7 @@ static INT_PTR connections_on_notify(HWND hwnd, WPARAM wparam, LPARAM lparam)
res
=
RegSetValueExW
(
con
,
L"DefaultConnectionSettings"
,
0
,
REG_BINARY
,
(
BYTE
*
)
default_connection
,
size
);
heap_
free
(
default_connection
);
free
(
default_connection
);
RegCloseKey
(
con
);
return
!
res
;
}
...
...
dlls/inetcpl.cpl/security.c
View file @
81a5a8f4
...
...
@@ -37,7 +37,6 @@
#include "inetcpl.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
inetcpl
);
...
...
@@ -273,8 +272,8 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
{
TRACE
(
"(%p)
\n
"
,
sd
);
heap_
free
(
sd
->
zone_attr
);
heap_
free
(
sd
->
zones
);
free
(
sd
->
zone_attr
);
free
(
sd
->
zones
);
if
(
sd
->
himages
)
{
SendMessageW
(
sd
->
hlv
,
LVM_SETIMAGELIST
,
LVSIL_NORMAL
,
0
);
ImageList_Destroy
(
sd
->
himages
);
...
...
@@ -282,7 +281,7 @@ static INT_PTR security_on_destroy(secdlg_data * sd)
security_cleanup_zones
(
sd
);
SetWindowLongPtrW
(
sd
->
hsec
,
DWLP_USER
,
0
);
heap_
free
(
sd
);
free
(
sd
);
return
TRUE
;
}
...
...
@@ -300,7 +299,7 @@ static INT_PTR security_on_initdialog(HWND hsec)
DWORD
lv_index
=
0
;
DWORD
i
;
sd
=
heap_alloc_zero
(
sizeof
(
secdlg_data
));
sd
=
calloc
(
1
,
sizeof
(
secdlg_data
));
SetWindowLongPtrW
(
hsec
,
DWLP_USER
,
(
LONG_PTR
)
sd
);
if
(
!
sd
)
{
return
FALSE
;
...
...
@@ -338,14 +337,14 @@ static INT_PTR security_on_initdialog(HWND hsec)
TRACE
(
"found %ld zones
\n
"
,
sd
->
num_zones
);
/* remember ZONEATTRIBUTES for a listview entry */
sd
->
zone_attr
=
heap_alloc
(
sizeof
(
ZONEATTRIBUTES
)
*
sd
->
num_zones
);
sd
->
zone_attr
=
calloc
(
sd
->
num_zones
,
sizeof
(
ZONEATTRIBUTES
)
);
if
(
!
sd
->
zone_attr
)
{
security_on_destroy
(
sd
);
return
FALSE
;
}
/* remember zone number and current security level for a listview entry */
sd
->
zones
=
heap_alloc
((
sizeof
(
DWORD
)
+
sizeof
(
DWORD
))
*
sd
->
num_zones
);
sd
->
zones
=
calloc
(
sd
->
num_zones
,
sizeof
(
DWORD
)
+
sizeof
(
DWORD
)
);
if
(
!
sd
->
zones
)
{
security_on_destroy
(
sd
);
return
FALSE
;
...
...
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