X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fvideo%2Fstb_truetype.h;h=26e483cf566ac8a20898e52ebc25e972f480d178;hb=235c5b8315c6a9eb566fd3d99a098cc6db869fc5;hp=91d8e6f905c76209b56f6b5113df1d4e696c3c81;hpb=161b1fe745394f34c4aa506edc964089785919f6;p=u-boot diff --git a/drivers/video/stb_truetype.h b/drivers/video/stb_truetype.h index 91d8e6f905..26e483cf56 100644 --- a/drivers/video/stb_truetype.h +++ b/drivers/video/stb_truetype.h @@ -2426,7 +2426,10 @@ STBTT_DEF unsigned char *stbtt_GetGlyphBitmapSubpixel(const stbtt_fontinfo *info if (scale_x == 0) scale_x = scale_y; if (scale_y == 0) { - if (scale_x == 0) return NULL; + if (scale_x == 0) { + STBTT_free(vertices, info->userdata); + return NULL; + } scale_y = scale_x; }