]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-91048: Fix error path result in _remote_debugging_module (GH-134347) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 21 May 2025 00:20:53 +0000 (02:20 +0200)
committerGitHub <noreply@github.com>
Wed, 21 May 2025 00:20:53 +0000 (00:20 +0000)
Modules/_remote_debugging_module.c

index 9314ddd9bed5d7f43ae012deb56a30666b32dd28..f9f77a0814b4cebe8b4549fe3c0e201659123b26 100644 (file)
@@ -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;
         }