[GRASS-SVN] r49885 - grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Dec 23 10:14:35 EST 2011


Author: mmetz
Date: 2011-12-23 07:14:35 -0800 (Fri, 23 Dec 2011)
New Revision: 49885

Modified:
   grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c
   grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/list.c
Log:
r.li.daemon: fix segfaults

Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c	2011-12-23 15:14:24 UTC (rev 49884)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/daemon.c	2011-12-23 15:14:35 UTC (rev 49885)
@@ -55,7 +55,11 @@
     /* int perc=0; */
 
     g = (g_areas) G_malloc(sizeof(struct generatore));
+    g->maskname = NULL;
     l = (list) G_malloc(sizeof(struct lista));
+    l->head = NULL;
+    l->tail = NULL;
+    l->size = 0;
     mypid = getpid();
 
     /* create report pipe */

Modified: grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/list.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/list.c	2011-12-23 15:14:24 UTC (rev 49884)
+++ grass/branches/releasebranch_6_4/raster/r.li/r.li.daemon/list.c	2011-12-23 15:14:35 UTC (rev 49885)
@@ -29,7 +29,7 @@
 {
     node new;
 
-    new = G_malloc(sizeof(node));
+    new = G_malloc(sizeof(struct nodoLista));
     new->m = G_malloc(sizeof(msg));
 
     if (new != NULL) {



More information about the grass-commit mailing list