Index: trunk/Ohana/src/libdvo/include/dvo.h
===================================================================
--- trunk/Ohana/src/libdvo/include/dvo.h	(revision 39312)
+++ trunk/Ohana/src/libdvo/include/dvo.h	(revision 39319)
@@ -1121,4 +1121,6 @@
 
 void InitHost (HostInfo *host);
+void FreeHostTable (HostTable *table);
+void FreeHostTableGroup (HostTableGroup *table);
 
 HostTableGroup *HostTableGroupsUniqueMachines (HostTable *table, int *ngroups);
Index: trunk/Ohana/src/libdvo/src/HostTable.c
===================================================================
--- trunk/Ohana/src/libdvo/src/HostTable.c	(revision 39312)
+++ trunk/Ohana/src/libdvo/src/HostTable.c	(revision 39319)
@@ -29,4 +29,6 @@
     free (hosts[i].hostname);
     free (hosts[i].pathname);
+    FreeIOBuffer (&hosts[i].stdout);
+    FreeIOBuffer (&hosts[i].stderr);
   }
   free (hosts);
@@ -34,5 +36,5 @@
 }
 
-void FreeTable (HostTable *table) {
+void FreeHostTable (HostTable *table) {
 
   if (!table) return;
@@ -46,5 +48,5 @@
 
 // a HostTableGroup is a pointer set to one or more HostTable entries
-void FreeTableGroup (HostTableGroup *table) {
+void FreeHostTableGroup (HostTableGroup *table) {
 
   if (!table) return;
@@ -264,5 +266,5 @@
     groups[i].Nhosts = 0;
     ALLOCATE (groups[i].hosts, HostInfo *, Nmax);
-    for (j = 0; j < Nmax; j++) {
+    for (j = 0; (j < Nmax) && (k < table->Nhosts); j++) {
       groups[i].hosts[groups[i].Nhosts] = &table->hosts[k];
       groups[i].Nhosts ++;
