From: Michael Gernoth Date: Sun, 6 Jun 2010 10:31:41 +0000 (+0200) Subject: don't continue when malloc bails out X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/rigol/commitdiff_plain/2d17f2ab31a270ebbac95879fef6c7d3176d1960 don't continue when malloc bails out --- 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;