]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-87092: fix refleak in peepholer test harness (#103448)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Tue, 11 Apr 2023 20:08:29 +0000 (21:08 +0100)
committerGitHub <noreply@github.com>
Tue, 11 Apr 2023 20:08:29 +0000 (21:08 +0100)
Python/compile.c

index 15fca8296c69ec4df3f6cb1992ae83fefcc32fb3..3e152060d2f1c2f3ab987c43078602461f4ea030 100644 (file)
@@ -7148,10 +7148,6 @@ _PyCompile_OptimizeCfg(PyObject *instructions, PyObject *consts)
     }
 
     cfg_builder g;
-    memset(&g, 0, sizeof(cfg_builder));
-    if (_PyCfgBuilder_Init(&g) < 0) {
-        goto error;
-    }
     if (instructions_to_cfg(instructions, &g) < 0) {
         goto error;
     }