summaryrefslogtreecommitdiff
path: root/bmtoa.c
diff options
context:
space:
mode:
authorTrevor Woerner <twoerner@gmail.com>2011-01-08 20:15:50 -0500
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-01-15 10:08:24 -0800
commite3ecaf24ea4187516a1a0679783278e34e56499f (patch)
treeda85bafebd5ab5e81622ae8fa31f8cda6c74e64a /bmtoa.c
parentf705edec1b9aa80d3b93f587048ad33887aca5b6 (diff)
Remove unused, leaky scanline.
The pointer, scanline, doesn't appear to be used anymore, and is leaking memory. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'bmtoa.c')
-rw-r--r--bmtoa.c7
1 files changed, 0 insertions, 7 deletions
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);