- npix = width * height;
-
- if(!(newfb = malloc(npix * 3 * sizeof *erb->fb_pixels))) {
- goto err;
- }
- if(!(newns = malloc(npix * sizeof *erb->fb_nsamples))) {
- free(newfb);
- goto err;
+ sz = width * height * 4 * sizeof *erb->fb_pixels;
+ if(!(newfb = malloc(sz))) {
+ fprintf(stderr, "erb_allocframe: failed to allocate %dx%d framebuffer\n", width, height);
+ return -1;