]> cvs.zerfleddert.de Git - rigol/blobdiff - png.c
don't continue when malloc bails out
[rigol] / 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