[GRASS-SVN] r50190 - grass/branches/develbranch_6/raster/r.in.gridatb

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Jan 14 19:49:16 EST 2012


Author: hamish
Date: 2012-01-14 16:49:16 -0800 (Sat, 14 Jan 2012)
New Revision: 50190

Modified:
   grass/branches/develbranch_6/raster/r.in.gridatb/file_io.c
Log:
avoid fclose()ing an already deallocated pointer (#1316, merge from trunk)

Modified: grass/branches/develbranch_6/raster/r.in.gridatb/file_io.c
===================================================================
--- grass/branches/develbranch_6/raster/r.in.gridatb/file_io.c	2012-01-15 00:48:55 UTC (rev 50189)
+++ grass/branches/develbranch_6/raster/r.in.gridatb/file_io.c	2012-01-15 00:49:16 UTC (rev 50190)
@@ -61,7 +61,8 @@
 	G_put_f_raster_row(fd, cell);
     }
     G_percent(i, cellhd.rows, 2);
-    fclose(fp);
+    if(fp)
+	fclose(fp);
     G_close_cell(fd);
 
     G_put_cell_title(oname, buf);



More information about the grass-commit mailing list