diff options
author | Mark Shannon <mark@hotpy.org> | 2021-11-22 14:01:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-22 14:01:23 (GMT) |
commit | 7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e (patch) | |
tree | 46c7f7aed9809c9a7d5f6b6a50eb151b1e2e8a38 /Objects | |
parent | d9cedabeba0d87799f99c0717e81743a1c2d34ce (diff) | |
download | cpython-7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e.zip cpython-7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e.tar.gz cpython-7fd92a8b7ee5bed28c2681fa38e0a1e76200dd8e.tar.bz2 |
bpo-45813: Make sure that frame->generator is NULLed when generator is deallocated. (GH-29700)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/genobject.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/genobject.c b/Objects/genobject.c index efd255d..c899ed6 100644 --- a/Objects/genobject.c +++ b/Objects/genobject.c @@ -134,6 +134,7 @@ gen_dealloc(PyGenObject *gen) InterpreterFrame *frame = gen->gi_xframe; if (frame != NULL) { gen->gi_xframe = NULL; + frame->generator = NULL; frame->previous = NULL; _PyFrame_Clear(frame, 1); } |