]> git.zerfleddert.de Git - rigol/commitdiff
don't continue when malloc bails out
authorMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 10:31:41 +0000 (12:31 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 6 Jun 2010 10:31:41 +0000 (12:31 +0200)
png.c

diff --git a/png.c b/png.c
index a85e7d701c99e92c4e0ca2c0017d956b8d5f30ae..ac09767fb8597d11b910a22db48b3a5dcf804319 100644 (file)
--- 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;
Impressum, Datenschutz