From e379a71811d370731f4dc814e5628d14952713d5 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 21 May 2025 02:20:53 +0200 Subject: [PATCH] [3.14] gh-91048: Fix error path result in _remote_debugging_module (GH-134347) (#134399) --- Modules/_remote_debugging_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/_remote_debugging_module.c b/Modules/_remote_debugging_module.c index 9314ddd9bed..f9f77a0814b 100644 --- a/Modules/_remote_debugging_module.c +++ b/Modules/_remote_debugging_module.c @@ -1556,7 +1556,7 @@ get_stack_trace(PyObject* self, PyObject* args) &address_of_current_frame) < 0) { - Py_DECREF(result); + Py_CLEAR(result); goto result_err; } @@ -1565,7 +1565,7 @@ get_stack_trace(PyObject* self, PyObject* args) } if (PyList_Append(result, frame_info) == -1) { - Py_DECREF(result); + Py_CLEAR(result); goto result_err; }