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

Make sure fd is properly closed if initialization fails #39

Merged
merged 2 commits into from
Mar 14, 2022

Conversation

jannic
Copy link
Contributor

@jannic jannic commented Mar 10, 2022

Closes #38

@jannic jannic changed the title Make sure a fd is properly closed if initialization fails Make sure fd is properly closed if initialization fails Mar 10, 2022
@jessebraham
Copy link
Member

Looks good overall, thanks for this!

It seems there is one instance of termios::set_termios being invoked which did not get updated, once that's fixed I'm happy to merge.

@jannic
Copy link
Contributor Author

jannic commented Mar 14, 2022

It seems there is one instance of termios::set_termios being invoked which did not get updated, once that's fixed I'm happy to merge.

Oops, yes, sorry. Missed that one as it's cfg-gated on ios/macos.

Copy link
Member

@jessebraham jessebraham left a comment

Choose a reason for hiding this comment

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

Not a problem, that's why we have CI 😁 Thanks for getting that fixed!

@jessebraham jessebraham merged commit 5992905 into serialport:main Mar 14, 2022
@jannic jannic deleted the fix-leak branch March 14, 2022 20:55
jannic added a commit to jannic/serialport-rs that referenced this pull request Mar 18, 2022
If opening succeeded, automatic closing on drop must be skipped
jessebraham pushed a commit that referenced this pull request Mar 22, 2022
If opening succeeded, automatic closing on drop must be skipped
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.

Possible file descriptor leak in open
2 participants