From b18255e298a891298b411f54fb23d6918cf6acbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 15 May 2019 17:58:29 +0200 Subject: [PATCH] Fix double free in font loading failure The memory is freeed in font_dealloc, doing that again leads to SIGABRT. --- src/_imagingft.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/_imagingft.c b/src/_imagingft.c index f6bd787ef..9a8bf7be0 100644 --- a/src/_imagingft.c +++ b/src/_imagingft.c @@ -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); }