[GRASS-SVN] r36753 -
grass/branches/develbranch_6/vector/v.net.visibility
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Apr 16 07:41:28 EDT 2009
Author: neteler
Date: 2009-04-16 07:41:28 -0400 (Thu, 16 Apr 2009)
New Revision: 36753
Modified:
grass/branches/develbranch_6/vector/v.net.visibility/main.c
grass/branches/develbranch_6/vector/v.net.visibility/visibility.c
Log:
fix memory leak as suggested by mmetz (merge from trunk, r36752)
Modified: grass/branches/develbranch_6/vector/v.net.visibility/main.c
===================================================================
--- grass/branches/develbranch_6/vector/v.net.visibility/main.c 2009-04-16 11:41:02 UTC (rev 36752)
+++ grass/branches/develbranch_6/vector/v.net.visibility/main.c 2009-04-16 11:41:28 UTC (rev 36753)
@@ -132,6 +132,7 @@
Vect_build(&out);
Vect_close(&out);
Vect_close(&in);
+
exit(EXIT_SUCCESS);
}
@@ -220,6 +221,8 @@
*num_points = index_point;
*num_lines = index_line;
+ Vect_destroy_line_struct(sites);
+ Vect_destroy_cats_struct(cats);
}
Modified: grass/branches/develbranch_6/vector/v.net.visibility/visibility.c
===================================================================
--- grass/branches/develbranch_6/vector/v.net.visibility/visibility.c 2009-04-16 11:41:02 UTC (rev 36752)
+++ grass/branches/develbranch_6/vector/v.net.visibility/visibility.c 2009-04-16 11:41:28 UTC (rev 36753)
@@ -219,6 +219,8 @@
Vect_copy_xyz_to_pnts(sites, tmpx, tmpy, 0, 2);
Vect_write_line(out, GV_LINE, sites, cats);
+ Vect_destroy_line_struct(sites);
+ Vect_destroy_cats_struct(cats);
G_free(tmpx);
G_free(tmpy);
}
More information about the grass-commit
mailing list