[mapserver-commits] r7397 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Fri Feb 22 18:34:46 EST 2008
Author: tamas
Date: 2008-02-22 18:34:46 -0500 (Fri, 22 Feb 2008)
New Revision: 7397
Modified:
trunk/mapserver/mapgd.c
Log:
Fixed gdImagePtr gdPImg memory leak in msSaveImageBufferGD() (#2525)
Modified: trunk/mapserver/mapgd.c
===================================================================
--- trunk/mapserver/mapgd.c 2008-02-19 16:38:00 UTC (rev 7396)
+++ trunk/mapserver/mapgd.c 2008-02-22 23:34:46 UTC (rev 7397)
@@ -3686,6 +3686,7 @@
gdPImg = msImageCreateWithPaletteGD(img, palette, gdImageSX(img), gdImageSY(img));
msImageCopyForcePaletteGD(img, gdPImg, method);
imgbytes = gdImagePngPtr(gdPImg, size_ptr);
+ gdImageDestroy(gdPImg);
}
else if ( force_pc256 ) {
gdImagePtr gdPImg;
@@ -3704,6 +3705,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