From e76f8b9a71e66f4f72f097f72528feec1e6b6e94 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 11 Apr 2015 08:23:02 +0200 Subject: [PATCH] init_video_pixel_converter - return false if calloc failed --- gfx/video_pixel_converter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gfx/video_pixel_converter.c b/gfx/video_pixel_converter.c index a7153ac25b..7c67ce77f3 100644 --- a/gfx/video_pixel_converter.c +++ b/gfx/video_pixel_converter.c @@ -55,6 +55,9 @@ bool init_video_pixel_converter(unsigned size) driver->scaler_out = calloc(sizeof(uint16_t), size * size); + if (!driver->scaler_out) + return false; + return true; }