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

events: fix double free with multiple subscribers #160

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

frbncis
Copy link
Collaborator

@frbncis frbncis commented Apr 17, 2021

This fixes a double free that occurs when you have multiple subscribers on the same event on the app and overlay threads.

If we have two subscribers (one in the app thread and one in the overlay thread), then the event was being posted to the overlay thread for every subscriber - thus the packet was being destroyed twice

This was encountered when adding a subscriber in notification.c for new notifications.

With this change, subscribers are executed first, then a single post to the overlay thread is made.

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.

1 participant