Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 94ab000

Browse files
committed
Fix a refleak in the MAKE_FUNCTION opcode in ceval.c.
1 parent 6ce7d1e commit 94ab000

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Python/ceval.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2298,6 +2298,8 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
22982298
u = POP(); /* kw only arg name */
22992299
/* XXX(nnorwitz): check for errors */
23002300
PyDict_SetItem(v, u, w);
2301+
Py_DECREF(w);
2302+
Py_DECREF(u);
23012303
}
23022304
err = PyFunction_SetKwDefaults(x, v);
23032305
Py_DECREF(v);

0 commit comments

Comments
 (0)