Skip to content

Commit 9cfcdb7

Browse files
authored
Remove dead code from tracemalloc (GH-21029)
tracemalloc_get_frame() checked filename == NULL two times in a row. Signed-off-by: Christian Heimes <[email protected]>
1 parent 20a7902 commit 9cfcdb7

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

Modules/_tracemalloc.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -319,10 +319,6 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
319319
return;
320320
}
321321

322-
assert(filename != NULL);
323-
if (filename == NULL)
324-
return;
325-
326322
if (!PyUnicode_Check(filename)) {
327323
#ifdef TRACE_DEBUG
328324
tracemalloc_error("filename is not a unicode string");

0 commit comments

Comments
 (0)