From bd5935032f295a1ae78aae26b671eec8f915a84d Mon Sep 17 00:00:00 2001 From: wiredfool Date: Mon, 27 Jan 2014 23:24:42 -0800 Subject: [PATCH] initialize unused pointer to prevent freeing without allocating --- _imagingft.c | 1 + 1 file changed, 1 insertion(+) diff --git a/_imagingft.c b/_imagingft.c index 6a646f64e..eb6313704 100644 --- a/_imagingft.c +++ b/_imagingft.c @@ -137,6 +137,7 @@ getfont(PyObject* self_, PyObject* args, PyObject* kw) } if (filename && font_bytes_size <= 0) { + self->font_bytes = NULL; error = FT_New_Face(library, filename, index, &self->face); } else { /* need to have allocated storage for font_bytes for the life of the object.*/