diff options
author | Yury Selivanov <yury@edgedb.com> | 2022-01-11 22:25:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-11 22:25:28 (GMT) |
commit | 607d8a838f29ad3c4c4e85b39f338dade5f9cafe (patch) | |
tree | 0b0d6f75ca5664c758c979992e9ab645fda159c7 /Python | |
parent | dce642f24418c58e67fa31a686575c980c31dd37 (diff) | |
download | cpython-607d8a838f29ad3c4c4e85b39f338dade5f9cafe.zip cpython-607d8a838f29ad3c4c4e85b39f338dade5f9cafe.tar.gz cpython-607d8a838f29ad3c4c4e85b39f338dade5f9cafe.tar.bz2 |
bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (#30546)
First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index be26ffd..85b4400 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -6128,16 +6128,9 @@ PyEval_EvalCodeEx(PyObject *_co, PyObject *globals, PyObject *locals, } allargs = newargs; } - PyObject **kwargs = PyMem_Malloc(sizeof(PyObject *)*kwcount); - if (kwargs == NULL) { - res = NULL; - Py_DECREF(kwnames); - goto fail; - } for (int i = 0; i < kwcount; i++) { Py_INCREF(kws[2*i]); PyTuple_SET_ITEM(kwnames, i, kws[2*i]); - kwargs[i] = kws[2*i+1]; } PyFrameConstructor constr = { .fc_globals = globals, |