[GRASS-SVN] r55839 - grass/branches/develbranch_6/lib/external/shapelib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Apr 16 23:03:37 PDT 2013
Author: hamish
Date: 2013-04-16 23:03:37 -0700 (Tue, 16 Apr 2013)
New Revision: 55839
Modified:
grass/branches/develbranch_6/lib/external/shapelib/shpopen.c
Log:
avoid mem leak (#1318, merge from trunk)
Modified: grass/branches/develbranch_6/lib/external/shapelib/shpopen.c
===================================================================
--- grass/branches/develbranch_6/lib/external/shapelib/shpopen.c 2013-04-17 06:03:16 UTC (rev 55838)
+++ grass/branches/develbranch_6/lib/external/shapelib/shpopen.c 2013-04-17 06:03:37 UTC (rev 55839)
@@ -846,7 +846,9 @@
if( fpSHP == NULL )
{
psHooks->Error( "Failed to create file .shp file." );
- return( NULL );
+ free( pszFullname );
+ free( pszBasename );
+ return( NULL );
}
sprintf( pszFullname, "%s.shx", pszBasename );
@@ -854,6 +856,8 @@
if( fpSHX == NULL )
{
psHooks->Error( "Failed to create file .shx file." );
+ free( pszFullname );
+ free( pszBasename );
return( NULL );
}
More information about the grass-commit
mailing list