Skip to content

gh-154109: fix sqlite load_extension memory leak - #154110

Open
MonadChains wants to merge 4 commits into
python:mainfrom
MonadChains:gh-154109/fix-sqlite-load-extension-leak
Open

MonadChains wants to merge 4 commits into
python:mainfrom
MonadChains:gh-154109/fix-sqlite-load-extension-leak

Conversation

@MonadChains

@MonadChains MonadChains commented Jul 19, 2026 •

Copy link
Copy Markdown
Contributor

Fix the memory leak created when sqlite3.Connection.load_extension() by freeing the buffer used to get the error message from the sqlite library.

Comment on lines +1 to +2
Fix memory leak in sqlite3.Connection.load_extension() when error is
returned

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
Fix memory leak in sqlite3.Connection.load_extension() when error is
returned
Fix memory leak in :meth:`sqlite3.Connection.load_extension` when
:exc:`sqlite3.OperationalError` is raised.

Please link to the docs when it's possible in the news entry.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also, it should be in the Library dir, not Security.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have updated the blurb, please have a check

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open for 90 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants