Attached a patch for the rrd-tool LIBDBI integration with the following improvements:
[rrdtool.git] / src / rrd_first.c
index 404b9f2..4fb4a4e 100644 (file)
@@ -1,11 +1,12 @@
 /*****************************************************************************
- * RRDtool 1.3rc5  Copyright by Tobi Oetiker, 1997-2008
+ * RRDtool 1.3.2  Copyright by Tobi Oetiker, 1997-2008
  *****************************************************************************
  * rrd_first Return
  *****************************************************************************
  * Initial version by Burton Strauss, ntopSupport.com - 3/2005
  *****************************************************************************/
 
+#include <stdlib.h>
 #include "rrd_tool.h"
 
 
@@ -65,6 +66,7 @@ time_t rrd_first_r(
     rrd_t     rrd;
     rrd_file_t *rrd_file;
 
+    rrd_init(&rrd);
     rrd_file = rrd_open(filename, &rrd, RRD_READONLY);
     if (rrd_file == NULL) {
         goto err_free;