Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Close fds on error#5009

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kolyshkin wants to merge4 commits intoopencontainers:main
base:main
Choose a base branch
Loading
fromkolyshkin:defer-close-init

Conversation

@kolyshkin
Copy link
Contributor

@kolyshkinkolyshkin commentedNov 12, 2025
edited
Loading

This addresses cases reported by@arinochk in#5008.

See individual commits for details.

@kolyshkinkolyshkin marked this pull request as ready for reviewNovember 12, 2025 22:47
This function calls Init what normally never returns, so the defer onlyworks if there is an error and we can safely use it to close those fdswe opened. This was done for most but not all fds.Reported in issue 5008.Reported-by: Arina Cherednik <arinacherednik034@gmail.com>Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Reported in issue 5008.Reported-by: Arina Cherednik <arinacherednik034@gmail.com>Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Reported in issue 5008.Reported-by: Arina Cherednik <arinacherednik034@gmail.com>Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Reported in issue 5008.Reported-by: Arina Cherednik <arinacherednik034@gmail.com>Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Copy link
Member

@cypharcyphar left a comment

Choose a reason for hiding this comment

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

It still feels a bit strange todefer closing stuff instartInitialization but it is what it is...

@cypharcyphar linked an issueNov 13, 2025 that may beclosed by this pull request
@kolyshkin
Copy link
ContributorAuthor

It still feels a bit strange todefer closing stuff instartInitialization but it is what it is...

There are a few (well, 3, to be exact) comments in there saying normally this function does not return and the defers are never called unless there's an error. Yet it takes some time to realize how things work here.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@cypharcypharcyphar approved these changes

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

SAST Potential resource leaks

2 participants

@kolyshkin@cyphar

[8]ページ先頭

©2009-2025 Movatter.jp