[Vegan-commits] r1316 - in pkg/gravy: inst src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Sep 24 12:23:08 CEST 2010


Author: jarioksa
Date: 2010-09-24 12:23:08 +0200 (Fri, 24 Sep 2010)
New Revision: 1316

Modified:
   pkg/gravy/inst/ChangeLog
   pkg/gravy/src/hill.c
Log:
fix memory leaks

Modified: pkg/gravy/inst/ChangeLog
===================================================================
--- pkg/gravy/inst/ChangeLog	2010-09-24 09:08:26 UTC (rev 1315)
+++ pkg/gravy/inst/ChangeLog	2010-09-24 10:23:08 UTC (rev 1316)
@@ -1,8 +1,9 @@
-Version 0.1-3 September 8, 2010
+Version 0.1-3 September 24, 2010
 	* HOF: gained residuals() method with (useful) 'type's "deviance",
 	"response" and "pearson" plus (useless) 'type = "working"'.
 	* HOF: returns 'family' object.
 	* HOF: added AICc as a criterion of model picking.
+	* hillscale: correct memory leaks.
 Version 0.1-2 March 18, 2010
 	* ssHOF: HOF gave unnecesarry warnings when used with non-integer
 	data. 

Modified: pkg/gravy/src/hill.c
===================================================================
--- pkg/gravy/src/hill.c	2010-09-24 09:08:26 UTC (rev 1315)
+++ pkg/gravy/src/hill.c	2010-09-24 10:23:08 UTC (rev 1316)
@@ -404,6 +404,11 @@
 
 	  } /* End the pass (cycle) 200 */
      } /* End the all resc rescaling cycles */
+     /* free what you allocated */
+     free(spWA);
+     free(spTol);
+     free(fidot);
+     free(fdotj);
 }
 
 /* Get the Hill indices of beta diversity with a segmented smooth without rescaling */
@@ -432,4 +437,9 @@
 	  zv1[i] = zv1[i]/zn[i];
 	  zv2[i] = zv2[i]/zn[i];
      }
+     /* free */
+     free(spWA);
+     free(spTol);
+     free(fidot);
+     free(fdotj);
 }



More information about the Vegan-commits mailing list