mirror of
https://github.com/reactos/reactos.git
synced 2025-07-10 04:34:36 +00:00
[sndvol32]
fix some memory leaks svn path=/trunk/; revision=67188
This commit is contained in:
parent
123774cc8c
commit
58e6b2e08a
2 changed files with 7 additions and 2 deletions
|
@ -90,6 +90,7 @@ SndMixerCreate(HWND hWndNotification)
|
||||||
VOID
|
VOID
|
||||||
SndMixerDestroy(PSND_MIXER Mixer)
|
SndMixerDestroy(PSND_MIXER Mixer)
|
||||||
{
|
{
|
||||||
|
ClearMixerCache(Mixer);
|
||||||
SndMixerClose(Mixer);
|
SndMixerClose(Mixer);
|
||||||
HeapFree(GetProcessHeap(),
|
HeapFree(GetProcessHeap(),
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -1018,9 +1018,13 @@ MainWindowProc(HWND hwnd,
|
||||||
{
|
{
|
||||||
MixerWindow = GetWindowData(hwnd,
|
MixerWindow = GetWindowData(hwnd,
|
||||||
MIXER_WINDOW);
|
MIXER_WINDOW);
|
||||||
if (MixerWindow->Mixer != NULL)
|
if (MixerWindow != NULL)
|
||||||
{
|
{
|
||||||
SndMixerDestroy(MixerWindow->Mixer);
|
if (MixerWindow->Mixer != NULL)
|
||||||
|
{
|
||||||
|
SndMixerDestroy(MixerWindow->Mixer);
|
||||||
|
}
|
||||||
|
HeapFree(hAppHeap, 0, MixerWindow);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue