From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sat, 27 Jun 2020 15:39:57 +0000 (-0700) Subject: Remove dead code from tracemalloc (GH-21029) X-Git-Tag: v3.9.0b4~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9191eacf9e1a4eabfadaf993779c428de7a0b2b3;p=thirdparty%2FPython%2Fcpython.git Remove dead code from tracemalloc (GH-21029) tracemalloc_get_frame() checked filename == NULL two times in a row. Signed-off-by: Christian Heimes (cherry picked from commit 9cfcdb7d6e4d09bde63bc7116b2ab0d96724527e) Co-authored-by: Christian Heimes --- diff --git a/Modules/_tracemalloc.c b/Modules/_tracemalloc.c index 567571657453..fc91622d3925 100644 --- a/Modules/_tracemalloc.c +++ b/Modules/_tracemalloc.c @@ -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");