mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 19:38:14 +00:00
Fix use after free when removing Windows audio device
This commit is contained in:

committed by
Ryan C. Gordon

parent
59a104b803
commit
f1390780ca
@@ -396,8 +396,9 @@ WASAPI_RemoveDevice(const SDL_bool iscapture, LPCWSTR devid)
|
||||
SDL_RemoveAudioDevice(iscapture, i->str);
|
||||
SDL_free(i->str);
|
||||
SDL_free(i);
|
||||
} else {
|
||||
prev = i;
|
||||
}
|
||||
prev = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user