IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 17, 2016, 3:00:30 PM (11 years ago)
Author:
eugene
Message:

fix the counting for ngroups, free allocated memory

Location:
trunk/Ohana/src/libdvo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/libdvo/include/dvo.h

    r39301 r39319  
    11211121
    11221122void InitHost (HostInfo *host);
     1123void FreeHostTable (HostTable *table);
     1124void FreeHostTableGroup (HostTableGroup *table);
    11231125
    11241126HostTableGroup *HostTableGroupsUniqueMachines (HostTable *table, int *ngroups);
  • trunk/Ohana/src/libdvo/src/HostTable.c

    r39308 r39319  
    2929    free (hosts[i].hostname);
    3030    free (hosts[i].pathname);
     31    FreeIOBuffer (&hosts[i].stdout);
     32    FreeIOBuffer (&hosts[i].stderr);
    3133  }
    3234  free (hosts);
     
    3436}
    3537
    36 void FreeTable (HostTable *table) {
     38void FreeHostTable (HostTable *table) {
    3739
    3840  if (!table) return;
     
    4648
    4749// a HostTableGroup is a pointer set to one or more HostTable entries
    48 void FreeTableGroup (HostTableGroup *table) {
     50void FreeHostTableGroup (HostTableGroup *table) {
    4951
    5052  if (!table) return;
     
    264266    groups[i].Nhosts = 0;
    265267    ALLOCATE (groups[i].hosts, HostInfo *, Nmax);
    266     for (j = 0; j < Nmax; j++) {
     268    for (j = 0; (j < Nmax) && (k < table->Nhosts); j++) {
    267269      groups[i].hosts[groups[i].Nhosts] = &table->hosts[k];
    268270      groups[i].Nhosts ++;
Note: See TracChangeset for help on using the changeset viewer.