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
33b2f69c
Commit
33b2f69c
authored
Apr 17, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 21, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix sample leak in file source on failure path.
parent
119d7caf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
filesource.c
dlls/quartz/filesource.c
+11
-13
No files found.
dlls/quartz/filesource.c
View file @
33b2f69c
...
...
@@ -1125,30 +1125,28 @@ static HRESULT WINAPI FileAsyncReader_WaitForNext(IAsyncReader * iface, DWORD dw
LeaveCriticalSection
(
&
This
->
csList
);
}
if
(
SUCCEEDED
(
hr
)
&&
!
This
->
bFlushing
)
if
(
SUCCEEDED
(
hr
))
{
/* get any errors */
if
(
!
GetOverlappedResult
(
This
->
hFile
,
&
pDataRq
->
ovl
,
&
dwBytes
,
FALSE
))
if
(
!
This
->
bFlushing
&&
!
GetOverlappedResult
(
This
->
hFile
,
&
pDataRq
->
ovl
,
&
dwBytes
,
FALSE
))
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
}
if
(
SUCCEEDED
(
hr
))
{
IMediaSample_SetActualDataLength
(
pDataRq
->
pSample
,
dwBytes
);
/* Return the sample no matter what so it can be destroyed */
*
ppSample
=
pDataRq
->
pSample
;
*
pdwUser
=
pDataRq
->
dwUserData
;
if
(
This
->
bFlushing
)
{
hr
=
VFW_E_WRONG_STATE
;
dwBytes
=
0
;
}
IMediaSample_SetActualDataLength
(
pDataRq
->
pSample
,
dwBytes
);
}
/* no need to close event handle since we will close it when the pin is destroyed */
CoTaskMemFree
(
pDataRq
);
/* Return the sample if flushing so it can be destroyed */
if
(
This
->
bFlushing
&&
SUCCEEDED
(
hr
))
{
hr
=
VFW_E_WRONG_STATE
;
IMediaSample_SetActualDataLength
(
pDataRq
->
pSample
,
0
);
}
TRACE
(
"-- %x
\n
"
,
hr
);
return
hr
;
}
...
...
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