File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ Release date: tba
1010Core and Builtins
1111-----------------
1212
13+ - Issue #26991: Fix possible refleak when creating a function with annotations.
14+
1315- Issue #27039: Fixed bytearray.remove() for values greater than 127. Based on
1416 patch by Joe Jevnik.
1517
Original file line number Diff line number Diff line change @@ -3291,6 +3291,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
32913291 PyObject * anns = PyDict_New ();
32923292 if (anns == NULL ) {
32933293 Py_DECREF (func );
3294+ Py_DECREF (names );
32943295 goto error ;
32953296 }
32963297 name_ix = PyTuple_Size (names );
@@ -3306,9 +3307,11 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
33063307 if (err != 0 ) {
33073308 Py_DECREF (anns );
33083309 Py_DECREF (func );
3310+ Py_DECREF (names );
33093311 goto error ;
33103312 }
33113313 }
3314+ Py_DECREF (names );
33123315
33133316 if (PyFunction_SetAnnotations (func , anns ) != 0 ) {
33143317 /* Can't happen unless
@@ -3318,7 +3321,6 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
33183321 goto error ;
33193322 }
33203323 Py_DECREF (anns );
3321- Py_DECREF (names );
33223324 }
33233325
33243326 /* XXX Maybe this should be a separate opcode? */
You can’t perform that action at this time.
0 commit comments