[GRASS-SVN] r41902 - in grass/trunk/raster/r.li: r.li.cwed
r.li.edgedensity r.li.mps r.li.padcv r.li.padrange r.li.padsd
r.li.patchdensity r.li.patchnum
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Apr 17 04:14:08 EDT 2010
Author: neteler
Date: 2010-04-17 04:14:08 -0400 (Sat, 17 Apr 2010)
New Revision: 41902
Modified:
grass/trunk/raster/r.li/r.li.cwed/cwed.c
grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
grass/trunk/raster/r.li/r.li.mps/mps.c
grass/trunk/raster/r.li/r.li.padcv/padcv.c
grass/trunk/raster/r.li/r.li.padrange/padrange.c
grass/trunk/raster/r.li/r.li.padsd/padsd.c
grass/trunk/raster/r.li/r.li.patchdensity/main.c
grass/trunk/raster/r.li/r.li.patchnum/main.c
Log:
free memory (fix trac #1030)
Modified: grass/trunk/raster/r.li/r.li.cwed/cwed.c
===================================================================
--- grass/trunk/raster/r.li/r.li.cwed/cwed.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.cwed/cwed.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -432,6 +432,8 @@
G_free(mask_corr);
G_free(mask_sup);
}
+
+ G_free(buf_sup);
return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c
===================================================================
--- grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.edgedensity/edgedensity.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -376,6 +376,8 @@
G_free(mask_inf);
G_free(mask_corr);
}
+
+ G_free(buf_sup);
return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.mps/mps.c
===================================================================
--- grass/trunk/raster/r.li/r.li.mps/mps.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.mps/mps.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -473,6 +473,7 @@
G_free(mask_patch_corr);
+ G_free(buf_sup);
return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.padcv/padcv.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padcv/padcv.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.padcv/padcv.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -520,6 +520,8 @@
G_free(mask_buf);
G_free(mask_patch_sup);
*result = indice;
+
+ G_free(buf_sup);
return RLI_OK;
}
int calculateD(int fd, area_des ad, double *result)
Modified: grass/trunk/raster/r.li/r.li.padrange/padrange.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padrange/padrange.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.padrange/padrange.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -508,6 +508,8 @@
G_free(mask_patch_sup);
*result = indice;
+
+ G_free(buf_sup);
return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.padsd/padsd.c
===================================================================
--- grass/trunk/raster/r.li/r.li.padsd/padsd.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.padsd/padsd.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -517,6 +517,9 @@
G_free(mask_buf);
G_free(mask_patch_sup);
*result = indice;
+
+ G_free(buf_sup);
+ G_free(buf);
return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.patchdensity/main.c
===================================================================
--- grass/trunk/raster/r.li/r.li.patchdensity/main.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.patchdensity/main.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -21,6 +21,7 @@
#include <grass/raster.h>
#include <grass/glocale.h>
#include "../r.li.daemon/daemon.h"
+#include "../r.li.daemon/defs.h"
int main(int argc, char *argv[])
{
@@ -199,5 +200,7 @@
*result = (count / area) * 1000000;
else
*result = -1;
- return 1;
+
+ G_free(sup);
+ return RLI_OK;
}
Modified: grass/trunk/raster/r.li/r.li.patchnum/main.c
===================================================================
--- grass/trunk/raster/r.li/r.li.patchnum/main.c 2010-04-17 08:13:04 UTC (rev 41901)
+++ grass/trunk/raster/r.li/r.li.patchnum/main.c 2010-04-17 08:14:08 UTC (rev 41902)
@@ -22,6 +22,7 @@
#include <grass/raster.h>
#include <grass/glocale.h>
#include "../r.li.daemon/daemon.h"
+#include "../r.li.daemon/defs.h"
int main(int argc, char *argv[])
{
@@ -174,8 +175,8 @@
}
+ *result = count;
-
- *result = count;
- return 1;
+ G_free(sup);
+ return RLI_OK;
}
More information about the grass-commit
mailing list