mirror of
https://github.com/python/cpython.git
synced 2025-07-31 07:04:42 +00:00
Fix some missing checks after PyTuple_New, PyList_New, PyDict_New
This commit is contained in:
parent
a5a0704942
commit
5c170fd4a9
7 changed files with 27 additions and 7 deletions
|
@ -1085,6 +1085,8 @@ gc_get_referrers(PyObject *self, PyObject *args)
|
|||
{
|
||||
int i;
|
||||
PyObject *result = PyList_New(0);
|
||||
if (!result) return NULL;
|
||||
|
||||
for (i = 0; i < NUM_GENERATIONS; i++) {
|
||||
if (!(gc_referrers_for(args, GEN_HEAD(i), result))) {
|
||||
Py_DECREF(result);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue