[GRASS-SVN] r46718 -
grass/branches/releasebranch_6_4/vector/v.net.salesman
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Jun 15 10:59:10 EDT 2011
Author: mmetz
Date: 2011-06-15 07:59:10 -0700 (Wed, 15 Jun 2011)
New Revision: 46718
Modified:
grass/branches/releasebranch_6_4/vector/v.net.salesman/main.c
Log:
fix segfault due to double memory allocation
Modified: grass/branches/releasebranch_6_4/vector/v.net.salesman/main.c
===================================================================
--- grass/branches/releasebranch_6_4/vector/v.net.salesman/main.c 2011-06-15 14:53:21 UTC (rev 46717)
+++ grass/branches/releasebranch_6_4/vector/v.net.salesman/main.c 2011-06-15 14:59:10 UTC (rev 46718)
@@ -204,7 +204,6 @@
}
costs = (COST **) G_malloc(ncities * sizeof(COST *));
- costs = (COST **) G_malloc((ncities - 1) * sizeof(COST *));
for (i = 0; i < ncities; i++) {
costs[i] = (COST *) G_malloc(ncities * sizeof(COST));
}
More information about the grass-commit
mailing list