Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NetPlayServer: Clear remaining m_players when netplay thread ends so that their destructors can run while the ENetHost still exists. #10237

Merged
merged 1 commit into from Nov 21, 2021

Conversation

AdmiralCurtiss
Copy link
Contributor

@AdmiralCurtiss AdmiralCurtiss commented Nov 20, 2021

Otherwise the QoSSession destructor attempts to access the already deleted ENetHost, which appears fairly harmless but is still technically a use-after-free. (and crashes Debug builds, which is how I found it)

e: Oh, to clarify, this is relevant when the host closes the window while some clients are still connected.

…that their destructors can run while the ENetHost still exists.
@leoetlino leoetlino merged commit d5b917a into dolphin-emu:master Nov 21, 2021
10 checks passed
@AdmiralCurtiss AdmiralCurtiss deleted the netplay-server-crash branch November 21, 2021 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants