Commit c3a4942b authored by Jörg Höhle's avatar Jörg Höhle Committed by Alexandre Julliard

mciwave: Zero closed resource pointer to prevent reuse.

parent be4d45ca
...@@ -870,6 +870,10 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt, ...@@ -870,6 +870,10 @@ static DWORD WAVE_mciPlay(MCIDEVICEID wDevID, DWORD_PTR dwFlags, DWORD_PTR pmt,
whidx = 0; whidx = 0;
wmw->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); wmw->hEvent = CreateEventW(NULL, FALSE, FALSE, NULL);
if (!wmw->hEvent) {
dwRet = MCIERR_OUT_OF_MEMORY;
goto cleanUp;
}
wmw->dwEventCount = 1L; /* for first buffer */ wmw->dwEventCount = 1L; /* for first buffer */
TRACE("Playing (normalized) from byte=%u for %u bytes\n", wmw->dwPosition, left); TRACE("Playing (normalized) from byte=%u for %u bytes\n", wmw->dwPosition, left);
...@@ -921,6 +925,7 @@ cleanUp: ...@@ -921,6 +925,7 @@ cleanUp:
wmw->hWave = 0; wmw->hWave = 0;
} }
CloseHandle(wmw->hEvent); CloseHandle(wmw->hEvent);
wmw->hEvent = NULL;
wmw->dwStatus = MCI_MODE_STOP; wmw->dwStatus = MCI_MODE_STOP;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment