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

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

parent a8b80787
......@@ -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. */
Sleep(90);
/* Wine starts playing immediately */
/*todo_wine test_notification(hwnd, "midiStream still paused", 0, WHATEVER);*/
/* Wine <1.1.39 started playing immediately */
test_notification(hwnd, "midiStream still paused", 0, WHATEVER);
/* MSDN asks to use midiStreamRestart prior to midiStreamOut()
* because the starting state is 'pause', but some apps seem to
......
......@@ -1614,7 +1614,7 @@ static DWORD CALLBACK MMSYSTEM_MidiStream_Player(LPVOID pmt)
SetEvent(lpMidiStrm->hEvent);
TRACE("Ready to go 1\n");
/* thread is started in paused mode */
SuspendThread(lpMidiStrm->hThread);
SuspendThread(GetCurrentThread());
TRACE("Ready to go 2\n");
lpMidiStrm->dwStartTicks = 0;
......@@ -1738,8 +1738,8 @@ MMRESULT WINAPI midiStreamClose(HMIDISTRM hMidiStrm)
midiStreamStop(hMidiStrm);
MMSYSTEM_MidiStream_PostMessage(lpMidiStrm, WM_QUIT, 0, 0);
HeapFree(GetProcessHeap(), 0, lpMidiStrm);
CloseHandle(lpMidiStrm->hEvent);
HeapFree(GetProcessHeap(), 0, lpMidiStrm);
return midiOutClose((HMIDIOUT)hMidiStrm);
}
......
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