diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-10-12 12:52:03 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-12 12:52:03 (GMT) |
commit | e16922f07010a620298d7fb8abfae5c578d5d337 (patch) | |
tree | 41934772ee52c84bb9554a71320bd4058c0c7cc2 /Python | |
parent | c9214b90f469aa85e307a6dc3b6052c961003807 (diff) | |
download | cpython-e16922f07010a620298d7fb8abfae5c578d5d337.zip cpython-e16922f07010a620298d7fb8abfae5c578d5d337.tar.gz cpython-e16922f07010a620298d7fb8abfae5c578d5d337.tar.bz2 |
[3.11] gh-109216: Fix possible memory leak in `BUILD_MAP` (#109323)
* [3.11] gh-109216: Fix possible memory leak in `BUILD_MAP`
* Add NEWS
* Update Python/ceval.c
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
---------
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 172bc47..bb6bb35 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3318,13 +3318,14 @@ handle_eval_breaker: &PEEK(2*oparg), 2, &PEEK(2*oparg - 1), 2, oparg); - if (map == NULL) - goto error; while (oparg--) { Py_DECREF(POP()); Py_DECREF(POP()); } + if (map == NULL) { + goto error; + } PUSH(map); DISPATCH(); } |