[mapserver-commits] r13044 - sandbox/sdlime/rfc-77

svn at osgeo.org svn at osgeo.org
Sun Feb 5 14:45:23 EST 2012


Author: sdlime
Date: 2012-02-05 11:45:23 -0800 (Sun, 05 Feb 2012)
New Revision: 13044

Modified:
   sandbox/sdlime/rfc-77/mapdraw.c
   sandbox/sdlime/rfc-77/mapfile.c
Log:
Found double-free error...

Modified: sandbox/sdlime/rfc-77/mapdraw.c
===================================================================
--- sandbox/sdlime/rfc-77/mapdraw.c	2012-02-05 19:16:59 UTC (rev 13043)
+++ sandbox/sdlime/rfc-77/mapdraw.c	2012-02-05 19:45:23 UTC (rev 13044)
@@ -2242,7 +2242,7 @@
       rectObj r;
 
       markerCacheMemberObj *markerPtr=NULL; /* for santity */
-      labelCacheMemberObj *cachePtr=NULL;      
+      labelCacheMemberObj *cachePtr=NULL;
       layerObj *layerPtr=NULL;
       labelObj *labelPtr=NULL;
 
@@ -2589,9 +2589,9 @@
       } /* next priority */
 
       return MS_SUCCESS; /* necessary? */
-    } else if( MS_RENDERER_IMAGEMAP(image->format) )
+    } else if( MS_RENDERER_IMAGEMAP(image->format) ) {
       nReturnVal = msDrawLabelCacheIM(image, map);
-
+    }
   }
 
   return nReturnVal;

Modified: sandbox/sdlime/rfc-77/mapfile.c
===================================================================
--- sandbox/sdlime/rfc-77/mapfile.c	2012-02-05 19:16:59 UTC (rev 13043)
+++ sandbox/sdlime/rfc-77/mapfile.c	2012-02-05 19:45:23 UTC (rev 13044)
@@ -5222,7 +5222,7 @@
       if (cacheslot->labels[i].labelpath)
         msFreeLabelPathObj(cacheslot->labels[i].labelpath);
 
-      for(j=0;j<cacheslot->labels[i].numlabels; j++) freeLabel(&(cacheslot->labels[i].labels[i]));
+      for(j=0;j<cacheslot->labels[i].numlabels; j++) freeLabel(&(cacheslot->labels[i].labels[j]));
 
       msFreeShape(cacheslot->labels[i].poly); /* empties the shape */
       msFree(cacheslot->labels[i].poly); /* free's the pointer */



More information about the mapserver-commits mailing list