-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
gh-126991: Fix reference leak in _pickle.c's load_build #126990
gh-126991: Fix reference leak in _pickle.c's load_build #126990
Conversation
If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tiny change, but this does technically need a NEWS entry.
Also, in the future, use the gh-<issue number>:
prefix for PRs so things get linked properly. I've done it for you this time though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. The test for this is non-trivial, so I wrote it myself.
Thanks @Legoclones for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…ythonGH-126990) If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable. (cherry picked from commit 29cbcbd) Co-authored-by: Justin Applegate <[email protected]>
…ythonGH-126990) If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable. (cherry picked from commit 29cbcbd) Co-authored-by: Justin Applegate <[email protected]>
GH-127018 is a backport of this pull request to the 3.13 branch. |
GH-127019 is a backport of this pull request to the 3.12 branch. |
…GH-126990) (GH-127019) If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable. (cherry picked from commit 29cbcbd) Co-authored-by: Justin Applegate <[email protected]>
…GH-126990) (GH-127018) If PyObject_SetItem() fails in the `load_build()` function of _pickle.c, no DECREF for the `dict` variable. (cherry picked from commit 29cbcbd) Co-authored-by: Justin Applegate <[email protected]>
Reference leak in load_build of _pickle.c
If PyObject_SetItem() fails in the
load_build()
function of _pickle.c, no DECREF for thedict
variableIssue - #126991