Decrement reference count for PyObject

This commit is contained in:
Andrew Murray 2023-11-13 15:11:28 +11:00
parent 25cc5afbb1
commit 086ca274fa

View File

@ -885,7 +885,9 @@ font_render(FontObject *self, PyObject *args) {
PyMem_Del(glyph_info);
return NULL;
}
id = PyLong_AsSsize_t(PyObject_GetAttrString(image, "id"));
PyObject *imageId = PyObject_GetAttrString(image, "id");
id = PyLong_AsSsize_t(imageId);
Py_XDECREF(imageId);
im = (Imaging)id;
x_offset -= stroke_width;