[mapserver-commits] r11602 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Tue Apr 19 06:47:15 EDT 2011
Author: tbonfort
Date: 2011-04-19 03:47:15 -0700 (Tue, 19 Apr 2011)
New Revision: 11602
Modified:
trunk/mapserver/mapfile.c
Log:
fix some minor memory leaks (#3193)x
Modified: trunk/mapserver/mapfile.c
===================================================================
--- trunk/mapserver/mapfile.c 2011-04-19 09:25:53 UTC (rev 11601)
+++ trunk/mapserver/mapfile.c 2011-04-19 10:47:15 UTC (rev 11602)
@@ -5289,14 +5289,19 @@
if( getString(&key) == MS_FAILURE )
return MS_FAILURE;
- if( getString(&value) == MS_FAILURE )
+ if( getString(&value) == MS_FAILURE ) {
+ free(key);
return MS_FAILURE;
+ }
- if (msSetConfigOption( map, key, value ) == MS_FAILURE)
+ if (msSetConfigOption( map, key, value ) == MS_FAILURE) {
+ free(key);
+ free(value);
return MS_FAILURE;
+ }
- free( key ); key=NULL;
- free( value ); value=NULL;
+ free( key );
+ free( value );
}
break;
More information about the mapserver-commits
mailing list