[mapserver-commits] r7398 - branches/branch-5-0/mapserver

svn at osgeo.org svn at osgeo.org
Fri Feb 22 18:36:05 EST 2008


Author: tamas
Date: 2008-02-22 18:36:05 -0500 (Fri, 22 Feb 2008)
New Revision: 7398

Modified:
   branches/branch-5-0/mapserver/mapgd.c
Log:
Fixed gdImagePtr gdPImg memory leak in msSaveImageBufferGD() (#2525)

Modified: branches/branch-5-0/mapserver/mapgd.c
===================================================================
--- branches/branch-5-0/mapserver/mapgd.c	2008-02-22 23:34:46 UTC (rev 7397)
+++ branches/branch-5-0/mapserver/mapgd.c	2008-02-22 23:36:05 UTC (rev 7398)
@@ -3701,6 +3701,7 @@
 
       msImageCopyForcePaletteGD(img, gdPImg);
       imgbytes = gdImagePngPtr(gdPImg, size_ptr);
+      gdImageDestroy(gdPImg);
     }
     else if ( force_pc256 ) {
       gdImagePtr gdPImg;
@@ -3719,6 +3720,7 @@
       for( i = 0; i < gdPImg->colorsTotal; i++ )
         gdPImg->open[i] = 0;
       imgbytes = gdImagePngPtr(gdPImg, size_ptr);
+      gdImageDestroy(gdPImg);
     }
     else
       imgbytes = gdImagePngPtr(img, size_ptr);



More information about the mapserver-commits mailing list