$OpenBSD: patch-pbm_pbmto10x_c,v 1.1 2003/03/29 04:13:54 brad Exp $ --- pbm/pbmto10x.c.orig Sat Aug 12 23:36:40 1995 +++ pbm/pbmto10x.c Fri Mar 28 20:22:06 2003 @@ -50,7 +50,7 @@ main(argc, argv) res_60x72(); pm_close(ifp); - exit(0); + return 0; } static void @@ -84,6 +84,8 @@ res_60x72() char *stripe, *sP; stripe = malloc(cols); + if(stripe == NULL) + pm_error("out of memory"); for (i = 0; i < LOW_RES_ROWS; ++i) bitrows[i] = pbm_allocrow(cols); printf("\033A\010"); /* '\n' = 8/72 */ @@ -117,6 +119,8 @@ res_120x144() char *stripe, *sP; stripe = malloc(cols); + if(stripe == NULL) + pm_error("out of memory"); for (i = 0; i < HIGH_RES_ROWS; ++i) bitrows[i] = pbm_allocrow(cols); printf("\0333\001"); /* \n = 1/144" */