gh-117139: Fix a few wrong steals in bytecodes.c (GH-121127)

Fix a few wrong steals in bytecodes.c
This commit is contained in:
Ken Jin 2024-06-29 02:14:48 +08:00 committed by GitHub
parent 2894aa14f2
commit e6543daf12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 33 deletions

View file

@ -1619,7 +1619,7 @@ initialize_locals(PyThreadState *tstate, PyFunctionObject *func,
goto kw_fail;
}
if (PyDict_SetItem(kwdict, keyword, PyStackRef_AsPyObjectSteal(value_stackref)) == -1) {
if (PyDict_SetItem(kwdict, keyword, PyStackRef_AsPyObjectBorrow(value_stackref)) == -1) {
goto kw_fail;
}
PyStackRef_CLOSE(value_stackref);