[MMEBUDDY]

Fix use after free.

CID #716804

svn path=/trunk/; revision=62632
This commit is contained in:
Pierre Schweitzer 2014-04-05 21:08:10 +00:00
parent 3bf3d743b5
commit ece6628139

View file

@ -306,15 +306,16 @@ DestroyAllSoundDeviceInstances(
IN PSOUND_DEVICE SoundDevice)
{
MMRESULT Result;
PSOUND_DEVICE_INSTANCE SoundDeviceInstance;
PSOUND_DEVICE_INSTANCE SoundDeviceInstance, NextDeviceInstance;
SoundDeviceInstance = SoundDevice->HeadInstance;
while ( SoundDeviceInstance )
{
NextDeviceInstance = SoundDeviceInstance->Next;
Result = DestroySoundDeviceInstance(SoundDeviceInstance);
SND_ASSERT( MMSUCCESS(Result) );
SoundDeviceInstance = SoundDeviceInstance->Next;
SoundDeviceInstance = NextDeviceInstance;
}
return MMSYSERR_NOERROR;