[GRASS-SVN] r55838 - grass/trunk/lib/external/shapelib

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Apr 16 23:03:16 PDT 2013


Author: hamish
Date: 2013-04-16 23:03:16 -0700 (Tue, 16 Apr 2013)
New Revision: 55838

Modified:
   grass/trunk/lib/external/shapelib/shpopen.c
Log:
avoid mem leak (#1318)

Modified: grass/trunk/lib/external/shapelib/shpopen.c
===================================================================
--- grass/trunk/lib/external/shapelib/shpopen.c	2013-04-17 05:53:17 UTC (rev 55837)
+++ grass/trunk/lib/external/shapelib/shpopen.c	2013-04-17 06:03:16 UTC (rev 55838)
@@ -846,6 +846,8 @@
     if( fpSHP == NULL )
     {
         psHooks->Error( "Failed to create file .shp file." );
+	free( pszFullname );
+	free( pszBasename );
         return( NULL );
     }
 
@@ -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