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

Early add a reference to a subscriber in videoroom handler. #2253

Merged
merged 1 commit into from
Jul 3, 2020

Conversation

atoppi
Copy link
Member

@atoppi atoppi commented Jun 29, 2020

This PR tries to fix a race condition that might occur in the videoroom plugin when a subscriber gets destroyed while the plugin thread is handling a subscriber message.

The proposed fix is to early add a reference to the subscriber in the message handler while the sessions_mutex is stil taken by the thread. This should avoid heap-use-after-free errors when trying to access a freed subscriber later in the handler code.

@lminiero
Copy link
Member

lminiero commented Jul 3, 2020

Merging.

@lminiero lminiero merged commit ae491c8 into meetecho:master Jul 3, 2020
@atoppi atoppi deleted the add-early-ref-subscriber branch September 8, 2020 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants