Skip to content

bpo-29734: nt._getfinalpathname handle leak#740

Merged
zooba merged 3 commits into
python:masterfrom
thebecwar:29734-Fix_Handle_Leaks
Feb 2, 2019
Merged

bpo-29734: nt._getfinalpathname handle leak#740
zooba merged 3 commits into
python:masterfrom
thebecwar:29734-Fix_Handle_Leaks

Conversation

@thebecwar

@thebecwar thebecwar commented Mar 20, 2017

Copy link
Copy Markdown
Contributor
  • Make sure that failure paths call CloseHandle
  • Fix inconsistent flags in GetFinalPathNameByHandleW calls
  • Move CloseHandle call from get_target_path to its calling function.
  • Add unit test to check that the fix works, and prevent regression

https://bugs.python.org/issue29734

https://bugs.python.org/issue29734

@mention-bot

Copy link
Copy Markdown

@thebecwar, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @serhiy-storchaka and @giampaolo to be potential reviewers.

Comment thread Modules/posixmodule.c
- Make sure that failure paths call CloseHandle
- Fix inconsistent flags in GetFinalPathNameByHandleW calls
- Move CloseHandle call from get_target_path to its calling function.
- Add unit test to check that the fix works, and prevent regression
@thebecwar thebecwar force-pushed the 29734-Fix_Handle_Leaks branch from 67e7dd6 to 23bfba7 Compare January 12, 2019 16:19
@zooba zooba merged commit b82bfac into python:master Feb 2, 2019
@miss-islington

Copy link
Copy Markdown
Contributor

Thanks @thebecwar for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 2, 2019
Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac)

Co-authored-by: Mark Becwar <mark@thebecwar.com>
@bedevere-bot

Copy link
Copy Markdown

GH-11740 is a backport of this pull request to the 3.7 branch.

miss-islington added a commit that referenced this pull request Feb 2, 2019
Make sure that failure paths call CloseHandle outside of the function that failed
(cherry picked from commit b82bfac)

Co-authored-by: Mark Becwar <mark@thebecwar.com>
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.

9 participants