Skip to content

gh-145989: Fix double Py_DECREF in pyexpat ExternalEntityParserCreate - #146017

Closed
0xCyberstan wants to merge 1 commit into
python:mainfrom
0xCyberstan:fix-pyexpat-double-decref
Closed

0xCyberstan wants to merge 1 commit into
python:mainfrom
0xCyberstan:fix-pyexpat-double-decref

Conversation

@0xCyberstan

@0xCyberstan 0xCyberstan commented Mar 16, 2026 •

Copy link
Copy Markdown

Remove redundant Py_DECREF(self) from three error paths in ExternalEntityParserCreate_impl(). The dealloc of new_parser already decrements the parent reference via Py_CLEAR(self->parent).

Use Py_NewRef() for the parent assignment for clarity.

Remove redundant Py_DECREF(self) from three error paths in
ExternalEntityParserCreate_impl(). The dealloc of new_parser
already decrements the parent reference via Py_CLEAR(self->parent).

Use Py_NewRef() for the parent assignment for clarity.
@bedevere-app

bedevere-app Bot commented Mar 16, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@python-cla-bot

python-cla-bot Bot commented Mar 16, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@picnixz

picnixz commented Mar 16, 2026

Copy link
Copy Markdown
Member

There is already a PR and issue for that: #144984

@picnixz picnixz closed this Mar 16, 2026
@0xCyberstan
0xCyberstan deleted the fix-pyexpat-double-decref branch March 16, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants