IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39449


Ignore:
Timestamp:
Mar 10, 2016, 12:41:52 PM (10 years ago)
Author:
eugene
Message:

plug some memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20160226/src/libdvo/src/RegionHostTable.c

    r39447 r39449  
    4747    FREE (hosts[i].imseq);
    4848    FREE (hosts[i].neighbors);
    49     AstromOffsetTableFree(hosts[i].astromTable);
     49    if (hosts[i].astromTable) {
     50      FREE (hosts[i].astromTable->map);
     51      FREE (hosts[i].astromTable->imageIDtoTableSeq);
     52      FREE (hosts[i].astromTable);
     53    }
     54    // do NOT use AstromOffsetTableFree : an astromTable is
     55    // only set here by relastro:assign_images, and it uses
     56    // AstromOffsetTableAddMapFromImage to assign pointers, not copies
     57    // AstromOffsetTableFree(hosts[i].astromTable);
    5058  }
    5159  free (hosts);
     
    9098  RegionHostInfo *hosts = NULL;
    9199  ALLOCATE (hosts, RegionHostInfo, NHOSTS);
    92   InitRegionHosts (hosts, Nhosts, NHOSTS);
     100  InitRegionHosts (hosts, 0, NHOSTS);
    93101
    94102  int maxID = 0;
Note: See TracChangeset for help on using the changeset viewer.