]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove dead code from tracemalloc (GH-21029)
authorChristian Heimes <christian@python.org>
Sat, 27 Jun 2020 12:13:47 +0000 (14:13 +0200)
committerGitHub <noreply@github.com>
Sat, 27 Jun 2020 12:13:47 +0000 (14:13 +0200)
tracemalloc_get_frame() checked filename == NULL two times in a row.

Signed-off-by: Christian Heimes <christian@python.org>
Modules/_tracemalloc.c

index 567571657453e75c22e4d809be463ed9dc70cd26..fc91622d3925b8424880b48bdd8f0f3a411fad9c 100644 (file)
@@ -319,10 +319,6 @@ tracemalloc_get_frame(PyFrameObject *pyframe, frame_t *frame)
         return;
     }
 
-    assert(filename != NULL);
-    if (filename == NULL)
-        return;
-
     if (!PyUnicode_Check(filename)) {
 #ifdef TRACE_DEBUG
         tracemalloc_error("filename is not a unicode string");