[GRASS-SVN] r65008 - grass/trunk/lib/nviz

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 6 14:28:45 PDT 2015


Author: annakrat
Date: 2015-04-06 14:28:45 -0700 (Mon, 06 Apr 2015)
New Revision: 65008

Modified:
   grass/trunk/lib/nviz/nviz.c
Log:
libnviz: fix stupid for loop mistake when freeing memory

Modified: grass/trunk/lib/nviz/nviz.c
===================================================================
--- grass/trunk/lib/nviz/nviz.c	2015-04-06 21:28:15 UTC (rev 65007)
+++ grass/trunk/lib/nviz/nviz.c	2015-04-06 21:28:45 UTC (rev 65008)
@@ -67,7 +67,7 @@
 void Nviz_destroy_data(nv_data *data)
 {
     int i;
-    for (i = 0; data->num_fringes; i++) {
+    for (i = 0; i < data->num_fringes; i++) {
 	G_free(data->fringe[i]);
 	data->fringe[i] = NULL;
     }
@@ -80,7 +80,7 @@
 	data->draw_arrow = 0;
     }
 
-    for (i = 0; data->num_scalebars; i++) {
+    for (i = 0; i < data->num_scalebars; i++) {
 	G_free(data->scalebar[i]);
 	data->scalebar[i] = NULL;
     }



More information about the grass-commit mailing list