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
7615ec07
Commit
7615ec07
authored
Jan 05, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jan 06, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Fix reference leak in tests.
Reported by Dan Kegel
parent
ef0a0d8b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
mmdevenum.c
dlls/mmdevapi/tests/mmdevenum.c
+12
-8
No files found.
dlls/mmdevapi/tests/mmdevenum.c
View file @
7615ec07
...
@@ -82,14 +82,18 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col)
...
@@ -82,14 +82,18 @@ static void test_collection(IMMDeviceEnumerator *mme, IMMDeviceCollection *col)
ok
(
hr
==
E_INVALIDARG
,
"Asking for too high device returned 0x%08x
\n
"
,
hr
);
ok
(
hr
==
E_INVALIDARG
,
"Asking for too high device returned 0x%08x
\n
"
,
hr
);
ok
(
dev
==
NULL
,
"Returned non-null device
\n
"
);
ok
(
dev
==
NULL
,
"Returned non-null device
\n
"
);
if
(
!
numdev
)
return
;
if
(
numdev
)
hr
=
IMMDeviceCollection_Item
(
col
,
0
,
NULL
);
{
ok
(
hr
==
E_POINTER
,
"Query with null pointer returned 0x%08x
\n
"
,
hr
);
hr
=
IMMDeviceCollection_Item
(
col
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Query with null pointer returned 0x%08x
\n
"
,
hr
);
hr
=
IMMDeviceCollection_Item
(
col
,
0
,
&
dev
);
ok
(
hr
==
S_OK
,
"Valid Item returned 0x%08x
\n
"
,
hr
);
hr
=
IMMDeviceCollection_Item
(
col
,
0
,
&
dev
);
ok
(
dev
!=
NULL
,
"Device is null!
\n
"
);
ok
(
hr
==
S_OK
,
"Valid Item returned 0x%08x
\n
"
,
hr
);
if
(
dev
)
IUnknown_Release
(
dev
);
ok
(
dev
!=
NULL
,
"Device is null!
\n
"
);
if
(
dev
)
IUnknown_Release
(
dev
);
}
IUnknown_Release
(
col
);
}
}
/* Only do parameter tests here, the actual MMDevice testing should be a separate test */
/* Only do parameter tests here, the actual MMDevice testing should be a separate test */
...
...
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