summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-28 22:56:58 (GMT)
committerGitHub <noreply@github.com>2020-04-28 22:56:58 (GMT)
commit6d86a2331e6b64a2ae80c1a21f81baa5a71ac594 (patch)
tree43b1e88fff7e3122019b4d948758534aeed39a87 /Modules
parent521c8d6806adf0305c158d280ec00cca48e8ab22 (diff)
downloadcpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.zip
cpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.tar.gz
cpython-6d86a2331e6b64a2ae80c1a21f81baa5a71ac594.tar.bz2
bpo-40429: PyFrame_GetCode() result cannot be NULL (GH-19772)
Add frame_nslots() to factorize duplicate code.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_tracemalloc.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c
index 3593bae..b2a0003 100644
--- a/Modules/_tracemalloc.c
+++ b/Modules/_tracemalloc.c
@@ -347,13 +347,6 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
frame->lineno = (unsigned int)lineno;
code = PyFrame_GetCode(pyframe);
- if (code == NULL) {
-#ifdef TRACE_DEBUG
- tracemalloc_error("failed to get the code object of the frame");
-#endif
- return;
- }
-
if (code->co_filename == NULL) {
#ifdef TRACE_DEBUG
tracemalloc_error("failed to get the filename of the code object");