Fix memory leak in Python IDproperty iterator

Looping over IDProperty keys or calling iteritems leaked memory.

Error in original Python idproperty support from
8768707610
This commit is contained in:
Campbell Barton 2021-05-11 11:13:28 +10:00 committed by Jeroen Bakker
parent b779fae993
commit 1555809480
Notes: blender-bot 2023-02-14 07:31:34 +01:00
Referenced by issue #77348, Blender LTS: Maintenance Task 2.83
1 changed files with 0 additions and 2 deletions

View File

@ -764,7 +764,6 @@ static PyObject *BPy_IDGroup_iter(BPy_IDProperty *self)
iter->group = self;
iter->mode = IDPROP_ITER_KEYS;
iter->cur = self->prop->data.group.first;
Py_XINCREF(iter);
return (PyObject *)iter;
}
@ -937,7 +936,6 @@ static PyObject *BPy_IDGroup_iter_items(BPy_IDProperty *self)
iter->group = self;
iter->mode = IDPROP_ITER_ITEMS;
iter->cur = self->prop->data.group.first;
Py_XINCREF(iter);
return (PyObject *)iter;
}