[GRASS-SVN] r45905 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Apr 11 15:28:50 EDT 2011
Author: martinl
Date: 2011-04-11 12:28:50 -0700 (Mon, 11 Apr 2011)
New Revision: 45905
Modified:
grass/trunk/lib/vector/Vlib/close_ogr.c
grass/trunk/lib/vector/Vlib/write.c
Log:
vlib: fix segfault for linked OGR datasources (double free OGR driver)
Modified: grass/trunk/lib/vector/Vlib/close_ogr.c
===================================================================
--- grass/trunk/lib/vector/Vlib/close_ogr.c 2011-04-11 16:53:40 UTC (rev 45904)
+++ grass/trunk/lib/vector/Vlib/close_ogr.c 2011-04-11 19:28:50 UTC (rev 45905)
@@ -43,8 +43,6 @@
if (Map->fInfo.ogr.feature_cache)
OGR_F_Destroy(Map->fInfo.ogr.feature_cache);
- if (Map->fInfo.ogr.driver)
- OGR_DS_Destroy(Map->fInfo.ogr.driver);
OGR_DS_Destroy(Map->fInfo.ogr.ds);
for (i = 0; i < Map->fInfo.ogr.lines_alloc; i++) {
Modified: grass/trunk/lib/vector/Vlib/write.c
===================================================================
--- grass/trunk/lib/vector/Vlib/write.c 2011-04-11 16:53:40 UTC (rev 45904)
+++ grass/trunk/lib/vector/Vlib/write.c 2011-04-11 19:28:50 UTC (rev 45905)
@@ -138,9 +138,8 @@
\return new feature id (level 2)
\return offset into file where the feature starts (level 1)
*/
-off_t
-Vect_write_line(struct Map_info *Map, int type,
- const struct line_pnts *points, const struct line_cats *cats)
+off_t Vect_write_line(struct Map_info *Map, int type,
+ const struct line_pnts *points, const struct line_cats *cats)
{
off_t offset;
More information about the grass-commit
mailing list