[mapserver-commits] r10507 - in sandbox/mapserver6/mapscript:
python swiginc
svn at osgeo.org
svn at osgeo.org
Fri Sep 17 12:07:02 EDT 2010
Author: aboudreault
Date: 2010-09-17 16:07:02 +0000 (Fri, 17 Sep 2010)
New Revision: 10507
Modified:
sandbox/mapserver6/mapscript/python/pyextend.i
sandbox/mapserver6/mapscript/swiginc/image.i
sandbox/mapserver6/mapscript/swiginc/symbol.i
Log:
Fixed small memory leaks in mapscript/swig...
Modified: sandbox/mapserver6/mapscript/python/pyextend.i
===================================================================
--- sandbox/mapserver6/mapscript/python/pyextend.i 2010-09-17 15:44:04 UTC (rev 10506)
+++ sandbox/mapserver6/mapscript/python/pyextend.i 2010-09-17 16:07:02 UTC (rev 10507)
@@ -252,6 +252,7 @@
renderer->mergeRasterBuffer(image, rb, 1.0, 0, 0, 0, 0, rb->width, rb->height);
msFreeRasterBuffer(rb);
+ free(rb);
return image;
}
Modified: sandbox/mapserver6/mapscript/swiginc/image.i
===================================================================
--- sandbox/mapserver6/mapscript/swiginc/image.i 2010-09-17 15:44:04 UTC (rev 10506)
+++ sandbox/mapserver6/mapscript/swiginc/image.i 2010-09-17 16:07:02 UTC (rev 10507)
@@ -80,6 +80,7 @@
renderer->mergeRasterBuffer(image, rb, 1.0, 0, 0, 0, 0, rb->width, rb->height);
msFreeRasterBuffer(rb);
+ free(rb);
return image;
}
Modified: sandbox/mapserver6/mapscript/swiginc/symbol.i
===================================================================
--- sandbox/mapserver6/mapscript/swiginc/symbol.i 2010-09-17 15:44:04 UTC (rev 10506)
+++ sandbox/mapserver6/mapscript/swiginc/symbol.i 2010-09-17 16:07:02 UTC (rev 10507)
@@ -157,8 +157,10 @@
renderer = image->format->vtable;
- if (self->pixmap_buffer)
+ if (self->pixmap_buffer) {
msFreeRasterBuffer(self->pixmap_buffer);
+ free(self->pixmap_buffer);
+ }
self->pixmap_buffer = (rasterBufferObj*)malloc(sizeof(rasterBufferObj));
if (!self->pixmap_buffer) {
More information about the mapserver-commits
mailing list