Minor memory leak fixes.
authorArnar Mar Hrafnkelsson <addi@cpan.org>
Thu, 1 Nov 2001 13:31:28 +0000 (13:31 +0000)
committerArnar Mar Hrafnkelsson <addi@cpan.org>
Thu, 1 Nov 2001 13:31:28 +0000 (13:31 +0000)
bmp.c
quant.c

diff --git a/bmp.c b/bmp.c
index 533fdbc91b3de493bd0ebf925f95d2593622ec1b..5d99d20717abc057ae68669e49386a5afaad081b 100644 (file)
--- a/bmp.c
+++ b/bmp.c
@@ -991,7 +991,6 @@ read_direct_bmp(io_glue *ig, int xsize, int ysize, int bit_count,
     lasty = ysize;
     yinc = 1;
   }
-  line = mymalloc(line_size);
   if (compression == BI_RGB) {
     masks = std_masks[pix_size-2];
     
diff --git a/quant.c b/quant.c
index 290d0c2ed50ffc85f099bffdd9f075ef5890cad7..40a54a7152295adf5f05ab214e819a187f05e75b 100644 (file)
--- a/quant.c
+++ b/quant.c
@@ -118,7 +118,7 @@ static void translate_giflib(i_quantize *quant, i_img *img, i_palidx *out) {
   
   i_color col;
 
-       mm_log((1,"i_writegif(quant %p, img %p, out %p)\n", quant, img, out));
+  mm_log((1,"translate_giflib(quant %p, img %p, out %p)\n", quant, img, out));
   
   /*if (!(im->channels==1 || im->channels==3)) { fprintf(stderr,"Unable to write gif, improper colorspace.\n"); exit(3); }*/
   
@@ -1035,6 +1035,7 @@ translate_errdiff(i_quantize *quant, i_img *img, i_palidx *out) {
     memset(err+(maph-1)*errw, 0, sizeof(*err)*errw);
   }
   CF_CLEANUP;
+  myfree(err);
 }
 /* Prescan finds the boxes in the image that have the highest number of colors 
    and that result is used as the initial value for the vectores */