From: Simon Glass Date: Mon, 22 Feb 2016 04:10:25 +0000 (-0700) Subject: video: truetype: Fix a memory leak on error X-Git-Tag: v2025.01-rc5-pxa1908~10212^2~2 X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24style.RelPermalink%20%7D%7D?a=commitdiff_plain;h=f6e75ba7fe220fdcf77c50d23a4f31ef828f75f5;p=u-boot.git video: truetype: Fix a memory leak on error When the resolution is not supported we should free the memory we don't plan to use. Reported-by: Coverity (CID: 135127) Signed-off-by: Simon Glass --- diff --git a/drivers/video/console_truetype.c b/drivers/video/console_truetype.c index c249f047f5..e16f95a02c 100644 --- a/drivers/video/console_truetype.c +++ b/drivers/video/console_truetype.c @@ -289,6 +289,7 @@ static int console_truetype_putc_xy(struct udevice *dev, uint x, uint y, } #endif default: + free(data); return -ENOSYS; }