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

Fix a leak in IpcOneShotServer on MacOS #327

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Fix a leak in IpcOneShotServer on MacOS #327

merged 1 commit into from
Sep 5, 2023

Conversation

mrobinson
Copy link
Member

The code allocates a mach port and it needs to deallocate it when the
server is dropped.

Fixes #262.

@@ -832,22 +824,26 @@ fn select(
pub struct OsIpcOneShotServer {
receiver: OsIpcReceiver,
name: String,
#[allow(dead_code)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field looks like it's read in the destructor. Why is this necessary?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm. I think I was just confused at the moment that I added this. It isn't necessary. I've pushed a new version of this change that removes it.

The code allocates a mach port and it needs to deallocate it when the
server is dropped.

Fixes #262.
@jdm jdm added this pull request to the merge queue Sep 5, 2023
Merged via the queue into master with commit 0b650d4 Sep 5, 2023
12 checks passed
@mrobinson mrobinson deleted the fix-oneshot-leak branch November 15, 2023 11:14
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.

IpcOneShotServer leaks mach ports
2 participants