[GRASS-SVN] r70508 - grass/trunk/raster/r.to.vect

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 8 11:53:53 PST 2017


Author: hcho
Date: 2017-02-08 11:53:53 -0800 (Wed, 08 Feb 2017)
New Revision: 70508

Modified:
   grass/trunk/raster/r.to.vect/set_error_handler.c
Log:
r.to.vect: Fix seg fault

Modified: grass/trunk/raster/r.to.vect/set_error_handler.c
===================================================================
--- grass/trunk/raster/r.to.vect/set_error_handler.c	2017-02-08 17:58:35 UTC (rev 70507)
+++ grass/trunk/raster/r.to.vect/set_error_handler.c	2017-02-08 19:53:53 UTC (rev 70508)
@@ -14,9 +14,11 @@
     if (input->driver && *input->driver)
 	db_close_database_shutdown_driver(*input->driver);
     if (input->Map) {
+	char *name = G_store(input->Map->name);
 	if (input->Map->open == VECT_OPEN_CODE)
 	    Vect_close(input->Map);
-	Vect_delete(input->Map->name);
+	Vect_delete(name);
+	G_free(name);
     }
 }
 



More information about the grass-commit mailing list