From e3ecaf24ea4187516a1a0679783278e34e56499f Mon Sep 17 00:00:00 2001 From: Trevor Woerner Date: Sat, 8 Jan 2011 20:15:50 -0500 Subject: Remove unused, leaky scanline. The pointer, scanline, doesn't appear to be used anymore, and is leaking memory. Signed-off-by: Trevor Woerner Reviewed-by: Adam Jackson Signed-off-by: Alan Coopersmith --- bmtoa.c | 7 ------- 1 file changed, 7 deletions(-) (limited to 'bmtoa.c') diff --git a/bmtoa.c b/bmtoa.c index bdd2078..5e48776 100644 --- a/bmtoa.c +++ b/bmtoa.c @@ -180,19 +180,12 @@ print_scanline (unsigned int width, unsigned char *data, char *chars) { - char *scanline = (char *) malloc (width + 1); unsigned char *dp = data; int row, column; static unsigned char masktable[] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 }; int padded = ((width & 7) != 0); - if (!scanline) { - fprintf (stderr, "%s: unable to allocate %d bytes for scanline\n", - ProgramName, width + 1); - exit (1); - } - for (row = 0; row < height; row++) { for (column = 0; column < width; column++) { int i = (column & 7); -- cgit v1.2.3