Author: cwittich
Date: Tue Apr 14 07:30:26 2015
New Revision: 67188
URL:
http://svn.reactos.org/svn/reactos?rev=67188&view=rev
Log:
[sndvol32]
fix some memory leaks
Modified:
trunk/reactos/base/applications/sndvol32/mixer.c
trunk/reactos/base/applications/sndvol32/sndvol32.c
Modified: trunk/reactos/base/applications/sndvol32/mixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
==============================================================================
--- trunk/reactos/base/applications/sndvol32/mixer.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndvol32/mixer.c [iso-8859-1] Tue Apr 14 07:30:26
2015
@@ -90,6 +90,7 @@
VOID
SndMixerDestroy(PSND_MIXER Mixer)
{
+ ClearMixerCache(Mixer);
SndMixerClose(Mixer);
HeapFree(GetProcessHeap(),
0,
Modified: trunk/reactos/base/applications/sndvol32/sndvol32.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/sndvol32…
==============================================================================
--- trunk/reactos/base/applications/sndvol32/sndvol32.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/sndvol32/sndvol32.c [iso-8859-1] Tue Apr 14 07:30:26
2015
@@ -1018,9 +1018,13 @@
{
MixerWindow = GetWindowData(hwnd,
MIXER_WINDOW);
- if (MixerWindow->Mixer != NULL)
- {
- SndMixerDestroy(MixerWindow->Mixer);
+ if (MixerWindow != NULL)
+ {
+ if (MixerWindow->Mixer != NULL)
+ {
+ SndMixerDestroy(MixerWindow->Mixer);
+ }
+ HeapFree(hAppHeap, 0, MixerWindow);
}
break;
}