فهرست منبع

avoid mem leak (https://trac.osgeo.org/grass/ticket/1318)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55838 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 سال پیش
والد
کامیت
688a3d3cf8
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      lib/external/shapelib/shpopen.c

+ 4 - 0
lib/external/shapelib/shpopen.c

@@ -846,6 +846,8 @@ SHPCreateLL( const char * pszLayer, int nShapeType, SAHooks *psHooks )
     if( fpSHP == NULL )
     {
         psHooks->Error( "Failed to create file .shp file." );
+	free( pszFullname );
+	free( pszBasename );
         return( NULL );
     }
 
@@ -854,6 +856,8 @@ SHPCreateLL( const char * pszLayer, int nShapeType, SAHooks *psHooks )
     if( fpSHX == NULL )
     {
         psHooks->Error( "Failed to create file .shx file." );
+	free( pszFullname );
+	free( pszBasename );
         return( NULL );
     }