summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-21 21:10:25 -0700
committerAnatolij Gustschin <agust@denx.de>2016-02-22 14:41:02 +0100
commitf6e75ba7fe220fdcf77c50d23a4f31ef828f75f5 (patch)
treee8f970f7317cdd0108af94e2d74fc425f50ee224 /drivers/video
parent595af9db2422fa5ae734cfe615415b17a5098f34 (diff)
downloadblackbird-obmc-uboot-f6e75ba7fe220fdcf77c50d23a4f31ef828f75f5.tar.gz
blackbird-obmc-uboot-f6e75ba7fe220fdcf77c50d23a4f31ef828f75f5.zip
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 <sjg@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/console_truetype.c1
1 files changed, 1 insertions, 0 deletions
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;
}
OpenPOWER on IntegriCloud