winmm: Fix incorrect memory useage (Valgrind w/ MIDI tests).

This commit is contained in:
Jörg Höhle 2010-02-10 20:54:10 +01:00 committed by Alexandre Julliard
parent a8b8078704
commit 7bd6be0706
2 changed files with 4 additions and 4 deletions

View File

@ -341,8 +341,8 @@ static void test_midiStream(UINT udev, HWND hwnd)
* but it will be set on all systems after the job is finished. */ * but it will be set on all systems after the job is finished. */
Sleep(90); Sleep(90);
/* Wine starts playing immediately */ /* Wine <1.1.39 started playing immediately */
/*todo_wine test_notification(hwnd, "midiStream still paused", 0, WHATEVER);*/ test_notification(hwnd, "midiStream still paused", 0, WHATEVER);
/* MSDN asks to use midiStreamRestart prior to midiStreamOut() /* MSDN asks to use midiStreamRestart prior to midiStreamOut()
* because the starting state is 'pause', but some apps seem to * because the starting state is 'pause', but some apps seem to

View File

@ -1614,7 +1614,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
SetEvent(lpMidiStrm->hEvent); SetEvent(lpMidiStrm->hEvent);
TRACE("Ready to go 1\n"); TRACE("Ready to go 1\n");
/* thread is started in paused mode */ /* thread is started in paused mode */
SuspendThread(lpMidiStrm->hThread); SuspendThread(GetCurrentThread());
TRACE("Ready to go 2\n"); TRACE("Ready to go 2\n");
lpMidiStrm->dwStartTicks = 0; lpMidiStrm->dwStartTicks = 0;
@ -1738,8 +1738,8 @@ MMRESULT WINAPI midiStreamClose(HMIDISTRM hMidiStrm)
midiStreamStop(hMidiStrm); midiStreamStop(hMidiStrm);
MMSYSTEM_MidiStream_PostMessage(lpMidiStrm, WM_QUIT, 0, 0); MMSYSTEM_MidiStream_PostMessage(lpMidiStrm, WM_QUIT, 0, 0);
HeapFree(GetProcessHeap(), 0, lpMidiStrm);
CloseHandle(lpMidiStrm->hEvent); CloseHandle(lpMidiStrm->hEvent);
HeapFree(GetProcessHeap(), 0, lpMidiStrm);
return midiOutClose((HMIDIOUT)hMidiStrm); return midiOutClose((HMIDIOUT)hMidiStrm);
} }