Jörg Höhle : winmm: Fix incorrect memory useage ( Valgrind w/ MIDI tests).
Alexandre Julliard
julliard at winehq.org
Thu Feb 11 11:08:31 CST 2010
Module: wine
Branch: master
Commit: 7bd6be0706ad7f2066d82840369486aebc7ecc77
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7bd6be0706ad7f2066d82840369486aebc7ecc77
Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date: Wed Feb 10 20:54:10 2010 +0100
winmm: Fix incorrect memory useage (Valgrind w/ MIDI tests).
---
dlls/winmm/tests/midi.c | 4 ++--
dlls/winmm/winmm.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/winmm/tests/midi.c b/dlls/winmm/tests/midi.c
index a94ea28..4a39cfc 100644
--- a/dlls/winmm/tests/midi.c
+++ b/dlls/winmm/tests/midi.c
@@ -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
diff --git a/dlls/winmm/winmm.c b/dlls/winmm/winmm.c
index a2074f6..233de32 100644
--- a/dlls/winmm/winmm.c
+++ b/dlls/winmm/winmm.c
@@ -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);
}
More information about the wine-cvs
mailing list