Values fetched from the database should not be accessed
after the database is closed, since the close frees the memory
involved.

--- src/cfenvd.c.~1~    2005-07-15 11:16:04.000000000 -0400
+++ src/cfenvd.c        2006-01-12 14:53:31.000000000 -0500
@@ -413,8 +413,6 @@
       }
    }

-dbp->close(dbp,0);
-
 if (value.data != NULL)
    {
    AGE = *(double *)(value.data);
@@ -426,6 +424,8 @@
    Debug("No previous AGE\n");
    AGE = 0.0;
    }
+
+dbp->close(dbp,0);
 }

 /*********************************************************************/

-- 
Joe Buehler



_______________________________________________
Help-cfengine mailing list
Help-cfengine@gnu.org
http://lists.gnu.org/mailman/listinfo/help-cfengine

Reply via email to