Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9fac9d8f
Commit
9fac9d8f
authored
Jan 27, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Jan 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Fix MIDI resource leaks.
parent
7bf41fac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
winmm.c
dlls/winmm/winmm.c
+10
-0
No files found.
dlls/winmm/winmm.c
View file @
9fac9d8f
...
...
@@ -1772,6 +1772,10 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
/* FIXME: the correct value is not allocated yet for MAPPER */
mosm
.
wDeviceID
=
*
lpuDeviceID
;
lpwm
=
MIDI_OutAlloc
(
&
hMidiOut
,
&
dwCallback
,
&
dwInstance
,
&
fdwOpen
,
1
,
&
mosm
);
if
(
!
lpwm
)
{
HeapFree
(
GetProcessHeap
(),
0
,
lpMidiStrm
);
return
MMSYSERR_NOMEM
;
}
lpMidiStrm
->
hDevice
=
hMidiOut
;
if
(
lphMidiStrm
)
*
lphMidiStrm
=
(
HMIDISTRM
)
hMidiOut
;
...
...
@@ -1779,6 +1783,12 @@ MMRESULT WINAPI midiStreamOpen(HMIDISTRM* lphMidiStrm, LPUINT lpuDeviceID,
lpwm
->
mld
.
uDeviceID
=
*
lpuDeviceID
;
ret
=
MMDRV_Open
(
&
lpwm
->
mld
,
MODM_OPEN
,
(
DWORD_PTR
)
&
lpwm
->
mod
,
fdwOpen
);
if
(
ret
!=
MMSYSERR_NOERROR
)
{
MMDRV_Free
(
hMidiOut
,
&
lpwm
->
mld
);
HeapFree
(
GetProcessHeap
(),
0
,
lpMidiStrm
);
return
ret
;
}
lpMidiStrm
->
hEvent
=
CreateEventW
(
NULL
,
FALSE
,
FALSE
,
NULL
);
lpMidiStrm
->
wFlags
=
HIWORD
(
fdwOpen
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment