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
0c823e83
Commit
0c823e83
authored
Jul 28, 2016
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 28, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Fully cleanup on initialization failure (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b271a1ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
mediatype.c
dlls/strmbase/mediatype.c
+5
-6
No files found.
dlls/strmbase/mediatype.c
View file @
0c823e83
...
...
@@ -111,11 +111,11 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e
IEnumMediaTypesImpl
*
pEnumMediaTypes
=
CoTaskMemAlloc
(
sizeof
(
IEnumMediaTypesImpl
));
AM_MEDIA_TYPE
amt
;
*
ppEnum
=
NULL
;
if
(
!
pEnumMediaTypes
)
{
*
ppEnum
=
NULL
;
return
E_OUTOFMEMORY
;
}
pEnumMediaTypes
->
IEnumMediaTypes_iface
.
lpVtbl
=
&
IEnumMediaTypesImpl_Vtbl
;
pEnumMediaTypes
->
refCount
=
1
;
pEnumMediaTypes
->
uIndex
=
0
;
...
...
@@ -129,14 +129,13 @@ HRESULT WINAPI EnumMediaTypes_Construct(BasePin *basePin, BasePin_GetMediaType e
pEnumMediaTypes
->
enumMediaDetails
.
cMediaTypes
=
i
;
pEnumMediaTypes
->
enumMediaDetails
.
pMediaTypes
=
CoTaskMemAlloc
(
sizeof
(
AM_MEDIA_TYPE
)
*
i
);
memset
(
pEnumMediaTypes
->
enumMediaDetails
.
pMediaTypes
,
0
,
sizeof
(
AM_MEDIA_TYPE
)
*
i
);
for
(
i
=
0
;
i
<
pEnumMediaTypes
->
enumMediaDetails
.
cMediaTypes
;
i
++
)
{
enumFunc
(
basePin
,
i
,
&
amt
);
if
(
FAILED
(
CopyMediaType
(
&
pEnumMediaTypes
->
enumMediaDetails
.
pMediaTypes
[
i
],
&
amt
)))
{
while
(
i
--
)
FreeMediaType
(
&
pEnumMediaTypes
->
enumMediaDetails
.
pMediaTypes
[
i
]);
CoTaskMemFree
(
pEnumMediaTypes
->
enumMediaDetails
.
pMediaTypes
);
IEnumMediaTypes_Release
(
&
pEnumMediaTypes
->
IEnumMediaTypes_iface
);
return
E_OUTOFMEMORY
;
}
}
...
...
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