summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-01-11 23:09:22 (GMT)
committerGitHub <noreply@github.com>2022-01-11 23:09:22 (GMT)
commitb1a94f1fab7c0aee0705483616a1b2c3f2713c00 (patch)
treed3f26ca7a912723b623fcca8a7f0712790dd6e44 /Python
parent6f035c07e0aeff9120a45e668a383c985cd8861a (diff)
downloadcpython-b1a94f1fab7c0aee0705483616a1b2c3f2713c00.zip
cpython-b1a94f1fab7c0aee0705483616a1b2c3f2713c00.tar.gz
cpython-b1a94f1fab7c0aee0705483616a1b2c3f2713c00.tar.bz2
bpo-46347: Fix memory leak in PyEval_EvalCodeEx. (GH-30546)
First introduced in 0332e569c12d3dc97171546c6dc10e42c27de34b (cherry picked from commit 607d8a838f29ad3c4c4e85b39f338dade5f9cafe) Co-authored-by: Yury Selivanov <yury@edgedb.com>
Diffstat (limited to 'Python')
-rw-r--r--Python/ceval.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/Python/ceval.c b/Python/ceval.c
index 8ad1713..e906076 100644
--- a/Python/ceval.c
+++ b/Python/ceval.c
@@ -5132,16 +5132,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,