mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-130050: Fix memory leaks in _testexternalinspection (#130051)
This commit is contained in:
parent
1b27f36eb0
commit
633853004c
1 changed files with 3 additions and 1 deletions
|
|
@ -778,6 +778,7 @@ parse_coro_chain(
|
|||
}
|
||||
|
||||
if (PyList_Append(render_to, name)) {
|
||||
Py_DECREF(name);
|
||||
return -1;
|
||||
}
|
||||
Py_DECREF(name);
|
||||
|
|
@ -955,7 +956,6 @@ parse_task(
|
|||
if (PyList_Append(render_to, result)) {
|
||||
goto err;
|
||||
}
|
||||
Py_DECREF(result);
|
||||
|
||||
PyObject *awaited_by = PyList_New(0);
|
||||
if (awaited_by == NULL) {
|
||||
|
|
@ -973,6 +973,7 @@ parse_task(
|
|||
) {
|
||||
goto err;
|
||||
}
|
||||
Py_DECREF(result);
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
@ -1527,6 +1528,7 @@ get_async_stack_trace(PyObject* self, PyObject* args)
|
|||
}
|
||||
PyObject* calls = PyList_New(0);
|
||||
if (calls == NULL) {
|
||||
Py_DECREF(result);
|
||||
return NULL;
|
||||
}
|
||||
if (PyList_SetItem(result, 0, calls)) { /* steals ref to 'calls' */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue