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 file descriptor leak in lineinfile module. #57328

Merged
merged 2 commits into from
Jun 4, 2019
Merged

Fix file descriptor leak in lineinfile module. #57328

merged 2 commits into from
Jun 4, 2019

Conversation

dw
Copy link
Contributor

@dw dw commented Jun 3, 2019

SUMMARY

Fix a minor file descriptor leak in the lineinfile module.

Fixes #57327

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • lineinfile
ADDITIONAL INFORMATION

This simply restores the prior os.fdopen() call so that the unmanaged file descriptor is consumed by a Python file object.

@ansibot
Copy link
Contributor

ansibot commented Jun 3, 2019

@ansibot ansibot added affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. files Files category module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Jun 3, 2019
@samdoran
Copy link
Contributor

samdoran commented Jun 4, 2019

Thank you for the detailed issue report and PR. Please create a changelog fragment. See this fragment as an example.

@dw
Copy link
Contributor Author

dw commented Jun 4, 2019

@samdoran whoops, done thanks!

@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed needs_triage Needs a first human triage before being processed. small_patch labels Jun 4, 2019
@samdoran samdoran merged commit 3fadf4a into ansible:devel Jun 4, 2019
samdoran pushed a commit to samdoran/ansible that referenced this pull request Jun 4, 2019
…57328)

(cherry picked from commit 3fadf4a)

Co-authored-by: dw <dw@botanicus.net>
@dw dw deleted the lineinfile branch June 4, 2019 17:09
abadger pushed a commit that referenced this pull request Jun 12, 2019
(cherry picked from commit 3fadf4a)

Co-authored-by: dw <dw@botanicus.net>
@ansible ansible locked and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. files Files category module This issue/PR relates to a module. support:community This issue/PR relates to code supported by the Ansible community. support:core This issue/PR relates to code supported by the Ansible Engineering Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lineinfile file descriptor leak since 2.7.0
4 participants