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

Don't delete handlers when they're removed #6

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

oxan
Copy link
Member

@oxan oxan commented Nov 10, 2021

This was an utterly idiotic API; if you accept pointers, you can't just assume ownership over them and unconditionally destroy them whenever you like too.

This broke the captive portal: when it stopped, it deinitialized the webserver, which deleted its handlers. As the captive portal object itself was one of the handlers, it and its member objects were now destroyed, and that caused its own continuing teardown to use-after-free or double-free (see esphome/esphome#2686).

@jesserockz jesserockz merged commit ac0ee8d into esphome:master Nov 11, 2021
@oxan oxan deleted the patch-2 branch November 11, 2021 20:05
@oxan oxan restored the patch-2 branch November 11, 2021 20:05
@oxan oxan deleted the patch-2 branch November 11, 2021 20:05
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