gh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32 by sergey-miryanov · Pull Request #133598 · python/cpython · GitHub
Skip to content

gh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32#133598

Merged
zooba merged 3 commits into
python:mainfrom
sergey-miryanov:fix_memory_leak_sys_getwindowsversion_from_kernel32
May 8, 2025
Merged

gh-133597: Fix memory leak if error occurred in _sys_getwindowsversion_from_kernel32#133598
zooba merged 3 commits into
python:mainfrom
sergey-miryanov:fix_memory_leak_sys_getwindowsversion_from_kernel32

Conversation

@sergey-miryanov

@sergey-miryanov sergey-miryanov commented May 7, 2025

Copy link
Copy Markdown
Contributor

If GetFileVersionInfoW or VerQueryValueW fails inside _sys_getwindowsversion_from_kernel32 then allocated verblock not freed.

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

@Eclips4

Eclips4 commented May 7, 2025

Copy link
Copy Markdown
Member

FYI, Sergey, the CI fails due to the recent beta(3.14b1) release. I'll restart it later.

@sergey-miryanov

Copy link
Copy Markdown
Contributor Author

Thanks! Yeah, I saw a possible fix #133599

@Eclips4 Eclips4 added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 7, 2025
@Eclips4 Eclips4 requested a review from zooba May 8, 2025 07:09
@zooba zooba merged commit 0ec8fc8 into python:main May 8, 2025
@miss-islington-app

Copy link
Copy Markdown

Thanks @sergey-miryanov for the PR, and @zooba for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2025
…version_from_kernel32 (pythonGH-133598)

(cherry picked from commit 0ec8fc8)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 8, 2025
…version_from_kernel32 (pythonGH-133598)

(cherry picked from commit 0ec8fc8)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
@bedevere-app

bedevere-app Bot commented May 8, 2025

Copy link
Copy Markdown

GH-133659 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label May 8, 2025
@bedevere-app

bedevere-app Bot commented May 8, 2025

Copy link
Copy Markdown

GH-133660 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label May 8, 2025
zooba pushed a commit that referenced this pull request May 8, 2025
…n_from_kernel32 (GH-133598)

(cherry picked from commit 0ec8fc8)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
zooba pushed a commit that referenced this pull request May 8, 2025
…n_from_kernel32 (GH-133598)

(cherry picked from commit 0ec8fc8)

Co-authored-by: Sergey Miryanov <sergey.miryanov@gmail.com>
@bedevere-bot

Copy link
Copy Markdown

Pranjal095 pushed a commit to Pranjal095/cpython that referenced this pull request Jul 12, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants