[GRASS-SVN] r36752 - grass/trunk/vector/v.net.visibility

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Apr 16 07:41:02 EDT 2009


Author: neteler
Date: 2009-04-16 07:41:02 -0400 (Thu, 16 Apr 2009)
New Revision: 36752

Modified:
   grass/trunk/vector/v.net.visibility/main.c
   grass/trunk/vector/v.net.visibility/visibility.c
Log:
fix memory leak as suggested by mmetz

Modified: grass/trunk/vector/v.net.visibility/main.c
===================================================================
--- grass/trunk/vector/v.net.visibility/main.c	2009-04-16 11:22:27 UTC (rev 36751)
+++ grass/trunk/vector/v.net.visibility/main.c	2009-04-16 11:41:02 UTC (rev 36752)
@@ -121,6 +121,7 @@
     Vect_build(&out);
     Vect_close(&out);
     Vect_close(&in);
+
     exit(EXIT_SUCCESS);
 }
 
@@ -209,6 +210,8 @@
     *num_points = index_point;
     *num_lines = index_line;
 
+    Vect_destroy_line_struct(sites);
+    Vect_destroy_cats_struct(cats);
 }
 
 

Modified: grass/trunk/vector/v.net.visibility/visibility.c
===================================================================
--- grass/trunk/vector/v.net.visibility/visibility.c	2009-04-16 11:22:27 UTC (rev 36751)
+++ grass/trunk/vector/v.net.visibility/visibility.c	2009-04-16 11:41:02 UTC (rev 36752)
@@ -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