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
07729ea4
Commit
07729ea4
authored
Jun 06, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Avoid leaking the media type on failure in IEnumMediaTypes::Next().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2cf4b601
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
pin.c
dlls/strmbase/pin.c
+9
-4
No files found.
dlls/strmbase/pin.c
View file @
07729ea4
...
...
@@ -119,6 +119,7 @@ static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count,
AM_MEDIA_TYPE
**
mts
,
ULONG
*
ret_count
)
{
struct
enum_media_types
*
enummt
=
impl_from_IEnumMediaTypes
(
iface
);
AM_MEDIA_TYPE
mt
;
unsigned
int
i
;
HRESULT
hr
;
...
...
@@ -133,10 +134,14 @@ static HRESULT WINAPI enum_media_types_Next(IEnumMediaTypes *iface, ULONG count,
for
(
i
=
0
;
i
<
count
;
++
i
)
{
if
((
mts
[
i
]
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
))))
hr
=
enummt
->
pin
->
ops
->
pin_get_media_type
(
enummt
->
pin
,
enummt
->
index
+
i
,
mts
[
i
]);
else
hr
=
E_OUTOFMEMORY
;
hr
=
enummt
->
pin
->
ops
->
pin_get_media_type
(
enummt
->
pin
,
enummt
->
index
+
i
,
&
mt
);
if
(
hr
==
S_OK
)
{
if
((
mts
[
i
]
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
))))
*
mts
[
i
]
=
mt
;
else
hr
=
E_OUTOFMEMORY
;
}
if
(
FAILED
(
hr
))
{
while
(
i
--
)
...
...
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