[mapserver-commits] r11820 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Jun 14 16:45:57 EDT 2011
Author: warmerdam
Date: 2011-06-14 13:45:57 -0700 (Tue, 14 Jun 2011)
New Revision: 11820
Modified:
trunk/mapserver/mapwcs.c
Log:
cleanup minor memory leaks with WCS 1.0
Modified: trunk/mapserver/mapwcs.c
===================================================================
--- trunk/mapserver/mapwcs.c 2011-06-14 20:36:30 UTC (rev 11819)
+++ trunk/mapserver/mapwcs.c 2011-06-14 20:45:57 UTC (rev 11820)
@@ -235,6 +235,7 @@
if(params->exceptions) free(params->exceptions);
if(params->time) free(params->time);
if(params->interpolation) free(params->interpolation);
+ CSLDestroy( params->coverages );
}
}
@@ -1626,12 +1627,14 @@
/* find the layer we are working with */
lp = NULL;
for(i=0; i<map->numlayers; i++) {
- coverageName = msOWSGetEncodeMetadata(&(GET_LAYER(map, i)->metadata), "CO", "name", GET_LAYER(map, i)->name);
+ coverageName = msOWSGetEncodeMetadata(&(GET_LAYER(map, i)->metadata), "CO", "name", GET_LAYER(map, i)->name);
if( EQUAL(coverageName, params->coverages[0]) &&
(msIntegerInArray(GET_LAYER(map, i)->index, ows_request->enabled_layers, ows_request->numlayers)) ) {
lp = GET_LAYER(map, i);
+ free( coverageName );
break;
}
+ free( coverageName );
}
if(lp == NULL) {
@@ -1923,6 +1926,7 @@
msLayerSetProcessingKey(lp, "BANDS", bandlist);
snprintf(numbands, sizeof(numbands), "%d", msCountChars(bandlist, ',')+1);
msSetOutputFormatOption(map->outputformat, "BAND_COUNT", numbands);
+ free( bandlist );
/* create the image object */
if(!map->outputformat) {
More information about the mapserver-commits
mailing list