mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-08-24 14:14:47 +03:00
Fix double free in font loading failure
The memory is freeed in font_dealloc, doing that again leads to SIGABRT.
This commit is contained in:
parent
32d10505a3
commit
b18255e298
|
@ -313,9 +313,6 @@ getfont(PyObject* self_, PyObject* args, PyObject* kw)
|
|||
PyMem_Free(filename);
|
||||
|
||||
if (error) {
|
||||
if (self->font_bytes) {
|
||||
PyMem_Free(self->font_bytes);
|
||||
}
|
||||
Py_DECREF(self);
|
||||
return geterror(error);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user