Daniele Forsi (dforsi@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6377
-gerrit
commit 5904c607c443b3edda00e346da04061bb1ebf3a6 Author: Daniele Forsi dforsi@gmail.com Date: Sat Jul 26 11:37:41 2014 +0200
device/oprom/yabel/vbe.c: fix memory leak
Do not allocate memory if the bootsplash was not found. Found by Cppcheck 1.65. NOT compile-tested. Fixes: [src/device/oprom/yabel/vbe.c:734]: (error) Memory leak: decdata
Change-Id: Ie2283165c9d7650dce9baf9e892dd055d44dcce5 Signed-off-by: Daniele Forsi dforsi@gmail.com --- src/device/oprom/yabel/vbe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/device/oprom/yabel/vbe.c b/src/device/oprom/yabel/vbe.c index 6283bbb..6354afe 100644 --- a/src/device/oprom/yabel/vbe.c +++ b/src/device/oprom/yabel/vbe.c @@ -719,7 +719,6 @@ void vbe_set_graphics(void) DEBUG_PRINTF_VBE("FRAMEBUFFER: 0x%p\n", framebuffer);
struct jpeg_decdata *decdata; - decdata = malloc(sizeof(*decdata));
/* Switching Intel IGD to 1MB video memory will break this. Who * cares. */ @@ -736,6 +735,7 @@ void vbe_set_graphics(void) DEBUG_PRINTF_VBE("Splash at %p ...\n", jpeg); dump(jpeg, 64);
+ decdata = malloc(sizeof(*decdata)); int ret = 0; DEBUG_PRINTF_VBE("Decompressing boot splash screen...\n"); ret = jpeg_decode(jpeg, framebuffer, 1024, 768, 16, decdata);