-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error handling in Darwin DNS-SD implementation to clean up proper…
…ly. (#35725) We had several codepaths where we could create a service ref but then do some fallible operations before calling Add() on the context. If those failed, they would call Finalize() on the context, which would delete the context, but _not_ DNSServiceRefDeallocate() the service ref. The fix is to make sure that: 1) All cases where we create a service ref successfully immediately set it on the context. 2) All context deletion goes through MdnsContexts::Delete, so that we make sure to clean up the service ref if there is one.
- Loading branch information
1 parent
b77b999
commit a51fa84
Showing
3 changed files
with
47 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters