free before return, not after

This commit is contained in:
wiredfool 2017-08-14 06:02:20 -07:00 committed by Eric Soroos
parent c25cd96b71
commit dc7ee29c46

View File

@ -2267,8 +2267,8 @@ _font_getmask(ImagingFontObject* self, PyObject* args)
im = ImagingNew(self->bitmap->mode, textwidth(self, text), self->ysize);
if (!im) {
return NULL;
free(text);
return NULL;
}
b = 0;