From 2d17f2ab31a270ebbac95879fef6c7d3176d1960 Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Sun, 6 Jun 2010 12:31:41 +0200 Subject: [PATCH] don't continue when malloc bails out --- png.c | 1 + 1 file changed, 1 insertion(+) diff --git a/png.c b/png.c index a85e7d7..ac09767 100644 --- a/png.c +++ b/png.c @@ -155,6 +155,7 @@ unsigned char *lcd2png(unsigned char *lcd, int *len) if (image == NULL) { perror("malloc"); + return NULL; } outpos = image; -- 2.39.2