Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
b676f148
Commit
b676f148
authored
Nov 08, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 08, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Fix leaks on error paths (Coverity).
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f2bb763c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
11 deletions
+9
-11
player.c
dlls/mfplay/player.c
+9
-11
No files found.
dlls/mfplay/player.c
View file @
b676f148
...
...
@@ -1024,6 +1024,15 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
IUnknown
*
object
;
HRESULT
hr
;
if
(
sync
&&
!
ret
)
return
E_POINTER
;
if
(
!
sync
&&
!
player
->
callback
)
{
WARN
(
"Asynchronous item creation is not supported without user callback.
\n
"
);
return
MF_E_INVALIDREQUEST
;
}
if
(
FAILED
(
hr
=
create_media_item
(
&
player
->
IMFPMediaPlayer_iface
,
user_data
,
&
item
)))
return
hr
;
...
...
@@ -1035,9 +1044,6 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
if
(
sync
)
{
if
(
!
ret
)
return
E_POINTER
;
*
ret
=
NULL
;
if
(
SUCCEEDED
(
hr
=
IMFSourceResolver_CreateObjectFromURL
(
player
->
resolver
,
url
,
MF_RESOLUTION_MEDIASOURCE
,
...
...
@@ -1054,17 +1060,9 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
}
IMFPMediaItem_Release
(
&
item
->
IMFPMediaItem_iface
);
return
hr
;
}
else
{
if
(
!
player
->
callback
)
{
WARN
(
"Asynchronous item creation is not supported without user callback.
\n
"
);
return
MF_E_INVALIDREQUEST
;
}
if
(
ret
)
*
ret
=
NULL
;
hr
=
IMFSourceResolver_BeginCreateObjectFromURL
(
player
->
resolver
,
url
,
MF_RESOLUTION_MEDIASOURCE
,
...
...
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