[mapserver-commits] r10328 - sandbox/mapserver6

svn at osgeo.org svn at osgeo.org
Fri Jul 9 07:20:39 EDT 2010


Author: tbonfort
Date: 2010-07-09 11:20:39 +0000 (Fri, 09 Jul 2010)
New Revision: 10328

Modified:
   sandbox/mapserver6/mapresample.c
Log:
free temp rasterbuffer for vector renderers


Modified: sandbox/mapserver6/mapresample.c
===================================================================
--- sandbox/mapserver6/mapresample.c	2010-07-09 11:05:04 UTC (rev 10327)
+++ sandbox/mapserver6/mapresample.c	2010-07-09 11:20:39 UTC (rev 10328)
@@ -1541,7 +1541,8 @@
     if( MS_RENDERER_PLUGIN( srcImage->format ) )
     {
         psrc_rb = &src_rb;
-        memset( psrc_rb, 0, sizeof(rasterBufferObj) ); if( srcImage->format->vtable->supports_pixel_buffer )
+        memset( psrc_rb, 0, sizeof(rasterBufferObj) );
+        if( srcImage->format->vtable->supports_pixel_buffer )
         {
         	  srcImage->format->vtable->getRasterBufferHandle( srcImage, psrc_rb );
         } else {
@@ -1566,7 +1567,11 @@
 
         if( result )
         {
+            if( MS_RENDERER_PLUGIN( srcImage->format ) && !srcImage->format->vtable->supports_pixel_buffer)
+               msFreeRasterBuffer(psrc_rb);
+            
             msFreeImage( srcImage );
+            
             return result;
         }
     }
@@ -1606,7 +1611,8 @@
     {
         if( layer->debug )
             msDebug( "msInitProjTransformer() returned NULL.\n" );
-
+        if( MS_RENDERER_PLUGIN( srcImage->format ) && !srcImage->format->vtable->supports_pixel_buffer)
+           msFreeRasterBuffer(psrc_rb);
         msFreeImage( srcImage );
         return MS_PROJERR;
     }
@@ -1639,6 +1645,8 @@
 /* -------------------------------------------------------------------- */
 /*      cleanup                                                         */
 /* -------------------------------------------------------------------- */
+    if( MS_RENDERER_PLUGIN( srcImage->format ) && !srcImage->format->vtable->supports_pixel_buffer)
+       msFreeRasterBuffer(psrc_rb);
     msFreeImage( srcImage );
 
     msFreeProjTransformer( pTCBData );



More information about the mapserver-commits mailing list