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
b003fa79
Commit
b003fa79
authored
Nov 09, 2022
by
Hans Leidekker
Committed by
Alexandre Julliard
Nov 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Use CRT allocation functions.
parent
9f3138b0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
list.c
dlls/netprofm/list.c
+15
-16
No files found.
dlls/netprofm/list.c
View file @
b003fa79
...
...
@@ -36,7 +36,6 @@
#include "olectl.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/list.h"
#include "netprofm_private.h"
...
...
@@ -200,7 +199,7 @@ static HRESULT WINAPI connection_point_Advise(
return
CO_E_FAILEDTOOPENTHREADTOKEN
;
}
sink_entry
=
heap_
alloc
(
sizeof
(
*
sink_entry
)
);
sink_entry
=
m
alloc
(
sizeof
(
*
sink_entry
)
);
if
(
!
sink_entry
)
{
IUnknown_Release
(
unk
);
...
...
@@ -217,7 +216,7 @@ static void sink_entry_release( struct sink_entry *entry )
{
list_remove
(
&
entry
->
entry
);
IUnknown_Release
(
entry
->
unk
);
heap_
free
(
entry
);
free
(
entry
);
}
static
HRESULT
WINAPI
connection_point_Unadvise
(
...
...
@@ -330,7 +329,7 @@ static ULONG WINAPI network_Release(
{
list_remove
(
&
network
->
entry
);
INetworkListManager_Release
(
network
->
mgr
);
heap_
free
(
network
);
free
(
network
);
}
return
refs
;
}
...
...
@@ -554,7 +553,7 @@ static struct network *create_network( const GUID *id )
{
struct
network
*
ret
;
if
(
!
(
ret
=
heap_alloc
(
sizeof
(
*
ret
)
)))
return
NULL
;
if
(
!
(
ret
=
calloc
(
1
,
sizeof
(
*
ret
)
)))
return
NULL
;
ret
->
INetwork_iface
.
lpVtbl
=
&
network_vtbl
;
ret
->
refs
=
1
;
...
...
@@ -738,7 +737,7 @@ static ULONG WINAPI networks_enum_Release(
if
(
!
(
refs
=
InterlockedDecrement
(
&
iter
->
refs
)))
{
INetworkListManager_Release
(
&
iter
->
mgr
->
INetworkListManager_iface
);
heap_
free
(
iter
);
free
(
iter
);
}
return
refs
;
}
...
...
@@ -883,7 +882,7 @@ static HRESULT create_networks_enum(
struct
networks_enum
*
iter
;
*
ret
=
NULL
;
if
(
!
(
iter
=
heap_alloc
(
sizeof
(
*
iter
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
iter
=
calloc
(
1
,
sizeof
(
*
iter
)
)))
return
E_OUTOFMEMORY
;
iter
->
IEnumNetworks_iface
.
lpVtbl
=
&
networks_enum_vtbl
;
iter
->
cursor
=
list_head
(
&
mgr
->
networks
);
...
...
@@ -952,7 +951,7 @@ static ULONG WINAPI connections_enum_Release(
if
(
!
(
refs
=
InterlockedDecrement
(
&
iter
->
refs
)))
{
INetworkListManager_Release
(
&
iter
->
mgr
->
INetworkListManager_iface
);
heap_
free
(
iter
);
free
(
iter
);
}
return
refs
;
}
...
...
@@ -1096,7 +1095,7 @@ static HRESULT create_connections_enum(
struct
connections_enum
*
iter
;
*
ret
=
NULL
;
if
(
!
(
iter
=
heap_alloc
(
sizeof
(
*
iter
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
iter
=
calloc
(
1
,
sizeof
(
*
iter
)
)))
return
E_OUTOFMEMORY
;
iter
->
IEnumNetworkConnections_iface
.
lpVtbl
=
&
connections_enum_vtbl
;
iter
->
mgr
=
mgr
;
...
...
@@ -1139,7 +1138,7 @@ static ULONG WINAPI list_manager_Release(
{
INetwork_Release
(
&
network
->
INetwork_iface
);
}
heap_
free
(
mgr
);
free
(
mgr
);
}
return
refs
;
}
...
...
@@ -1496,7 +1495,7 @@ static ULONG WINAPI connection_Release(
{
list_remove
(
&
connection
->
entry
);
INetwork_Release
(
connection
->
network
);
heap_
free
(
connection
);
free
(
connection
);
}
return
refs
;
}
...
...
@@ -1728,7 +1727,7 @@ static struct connection *create_connection( const GUID *id )
{
struct
connection
*
ret
;
if
(
!
(
ret
=
heap_alloc
(
sizeof
(
*
ret
)
)))
return
NULL
;
if
(
!
(
ret
=
calloc
(
1
,
sizeof
(
*
ret
)
)))
return
NULL
;
ret
->
INetworkConnection_iface
.
lpVtbl
=
&
connection_vtbl
;
ret
->
INetworkConnectionCost_iface
.
lpVtbl
=
&
connection_cost_vtbl
;
...
...
@@ -1756,10 +1755,10 @@ static void init_networks( struct list_manager *mgr )
ret
=
GetAdaptersAddresses
(
AF_UNSPEC
,
flags
,
NULL
,
NULL
,
&
size
);
if
(
ret
!=
ERROR_BUFFER_OVERFLOW
)
return
;
if
(
!
(
buf
=
heap_
alloc
(
size
)))
return
;
if
(
!
(
buf
=
m
alloc
(
size
)))
return
;
if
(
GetAdaptersAddresses
(
AF_UNSPEC
,
flags
,
NULL
,
buf
,
&
size
))
{
heap_
free
(
buf
);
free
(
buf
);
return
;
}
...
...
@@ -1802,7 +1801,7 @@ static void init_networks( struct list_manager *mgr )
}
done:
heap_
free
(
buf
);
free
(
buf
);
}
HRESULT
list_manager_create
(
void
**
obj
)
...
...
@@ -1811,7 +1810,7 @@ HRESULT list_manager_create( void **obj )
TRACE
(
"%p
\n
"
,
obj
);
if
(
!
(
mgr
=
heap_alloc
(
sizeof
(
*
mgr
)
)))
return
E_OUTOFMEMORY
;
if
(
!
(
mgr
=
calloc
(
1
,
sizeof
(
*
mgr
)
)))
return
E_OUTOFMEMORY
;
mgr
->
INetworkListManager_iface
.
lpVtbl
=
&
list_manager_vtbl
;
mgr
->
INetworkCostManager_iface
.
lpVtbl
=
&
cost_manager_vtbl
;
mgr
->
IConnectionPointContainer_iface
.
lpVtbl
=
&
cpc_vtbl
;
...
...
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