Index: trunk/Ohana/src/libohana/include/ohana.h
===================================================================
--- trunk/Ohana/src/libohana/include/ohana.h	(revision 41467)
+++ trunk/Ohana/src/libohana/include/ohana.h	(revision 41468)
@@ -415,4 +415,5 @@
 int    push_error                PROTO((char *line));
 int    print_error               PROTO((void));
+void   free_error                PROTO(());
 
 // gprint gets a stub implementation in libohana. opihi implements the real one.
Index: trunk/Ohana/src/libohana/src/errors.c
===================================================================
--- trunk/Ohana/src/libohana/src/errors.c	(revision 41467)
+++ trunk/Ohana/src/libohana/src/errors.c	(revision 41468)
@@ -51,2 +51,9 @@
   return (TRUE);
 }
+
+void free_error() {
+  for (int i = 0; i < Nline; i++) {
+    FREE (errorlines[i]);
+  }
+  FREE (errorlines);
+}
Index: trunk/Ohana/src/libohana/src/time.c
===================================================================
--- trunk/Ohana/src/libohana/src/time.c	(revision 41467)
+++ trunk/Ohana/src/libohana/src/time.c	(revision 41468)
@@ -251,5 +251,9 @@
   ALLOCATE (line, char, 64);
   gmt   = gmtime (&second);
-  snprintf (line, 64, "%04d/%02d/%02d,%02d:%02d:%02d", 1900 + gmt[0].tm_year, gmt[0].tm_mon+1, gmt[0].tm_mday, gmt[0].tm_hour, gmt[0].tm_min, gmt[0].tm_sec); 
+  if (!gmt) {
+    snprintf (line, 64, "INVALID DATE");
+  } else {
+    snprintf (line, 64, "%04d/%02d/%02d,%02d:%02d:%02d", 1900 + gmt[0].tm_year, gmt[0].tm_mon+1, gmt[0].tm_mday, gmt[0].tm_hour, gmt[0].tm_min, gmt[0].tm_sec); 
+  }
   return (line);
 
