mirror of
https://github.com/reactos/reactos.git
synced 2024-08-04 10:30:59 +00:00
[MMEBUDDY]
Fix use after free. CID #716804 svn path=/trunk/; revision=62632
This commit is contained in:
parent
3bf3d743b5
commit
ece6628139
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue