help-cfengine
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] access after free in cfenvd.c


From: Joe Buehler
Subject: [PATCH] access after free in cfenvd.c
Date: Fri, 13 Jan 2006 10:25:37 -0500
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]