mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:26:10 +00:00
mciwave: Zero closed resource pointer to prevent reuse.
This commit is contained in:
parent
be4d45cacb
commit
c3a4942b50
1 changed files with 5 additions and 0 deletions
|
@ -870,6 +870,10 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
|
|||
|
||||
whidx = 0;
|
||||
wmw->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
|
||||
if (!wmw->hEvent) {
|
||||
dwRet = MCIERR_OUT_OF_MEMORY;
|
||||
goto cleanUp;
|
||||
}
|
||||
wmw->dwEventCount = 1L; /* for first buffer */
|
||||
|
||||
TRACE("Playing (normalized) from byte=%u for %u bytes\n", wmw->dwPosition, left);
|
||||
|
@ -921,6 +925,7 @@ cleanUp:
|
|||
wmw->hWave = 0;
|
||||
}
|
||||
CloseHandle(wmw->hEvent);
|
||||
wmw->hEvent = NULL;
|
||||
|
||||
wmw->dwStatus = MCI_MODE_STOP;
|
||||
|
||||
|
|
Loading…
Reference in a new issue