mciwave: Zero closed resource pointer to prevent reuse.

This commit is contained in:
Jörg Höhle 2012-02-16 07:31:40 +01:00 committed by Alexandre Julliard
parent be4d45cacb
commit c3a4942b50
1 changed files with 5 additions and 0 deletions

View File

@ -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;