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
c289169a
Commit
c289169a
authored
Aug 18, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 20, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Release connection point sink entries in object destructor.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
ba156ed2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
list.c
dlls/netprofm/list.c
+17
-3
No files found.
dlls/netprofm/list.c
View file @
c289169a
...
@@ -222,6 +222,13 @@ static HRESULT WINAPI connection_point_Advise(
...
@@ -222,6 +222,13 @@ static HRESULT WINAPI connection_point_Advise(
return
S_OK
;
return
S_OK
;
}
}
static
void
sink_entry_release
(
struct
sink_entry
*
entry
)
{
list_remove
(
&
entry
->
entry
);
IUnknown_Release
(
entry
->
unk
);
heap_free
(
entry
);
}
static
HRESULT
WINAPI
connection_point_Unadvise
(
static
HRESULT
WINAPI
connection_point_Unadvise
(
IConnectionPoint
*
iface
,
IConnectionPoint
*
iface
,
DWORD
cookie
)
DWORD
cookie
)
...
@@ -234,9 +241,7 @@ static HRESULT WINAPI connection_point_Unadvise(
...
@@ -234,9 +241,7 @@ static HRESULT WINAPI connection_point_Unadvise(
LIST_FOR_EACH_ENTRY
(
iter
,
&
cp
->
sinks
,
struct
sink_entry
,
entry
)
LIST_FOR_EACH_ENTRY
(
iter
,
&
cp
->
sinks
,
struct
sink_entry
,
entry
)
{
{
if
(
iter
->
cookie
!=
cookie
)
continue
;
if
(
iter
->
cookie
!=
cookie
)
continue
;
list_remove
(
&
iter
->
entry
);
sink_entry_release
(
iter
);
IUnknown_Release
(
iter
->
unk
);
heap_free
(
iter
);
return
S_OK
;
return
S_OK
;
}
}
...
@@ -278,6 +283,12 @@ static void connection_point_init(
...
@@ -278,6 +283,12 @@ static void connection_point_init(
list_init
(
&
cp
->
sinks
);
list_init
(
&
cp
->
sinks
);
}
}
static
void
connection_point_release
(
struct
connection_point
*
cp
)
{
while
(
!
list_empty
(
&
cp
->
sinks
))
sink_entry_release
(
LIST_ENTRY
(
list_head
(
&
cp
->
sinks
),
struct
sink_entry
,
entry
)
);
}
static
inline
struct
network
*
impl_from_INetwork
(
static
inline
struct
network
*
impl_from_INetwork
(
INetwork
*
iface
)
INetwork
*
iface
)
{
{
...
@@ -1110,6 +1121,9 @@ static ULONG WINAPI list_manager_Release(
...
@@ -1110,6 +1121,9 @@ static ULONG WINAPI list_manager_Release(
TRACE
(
"destroying %p
\n
"
,
mgr
);
TRACE
(
"destroying %p
\n
"
,
mgr
);
connection_point_release
(
&
mgr
->
conn_mgr_cp
);
connection_point_release
(
&
mgr
->
cost_mgr_cp
);
connection_point_release
(
&
mgr
->
list_mgr_cp
);
while
((
ptr
=
list_head
(
&
mgr
->
networks
)))
while
((
ptr
=
list_head
(
&
mgr
->
networks
)))
{
{
struct
network
*
network
=
LIST_ENTRY
(
ptr
,
struct
network
,
entry
);
struct
network
*
network
=
LIST_ENTRY
(
ptr
,
struct
network
,
entry
);
...
...
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