IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 34578 for trunk


Ignore:
Timestamp:
Oct 25, 2012, 10:21:36 AM (14 years ago)
Author:
eugene
Message:

prevent malloc error in dvomerge

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/dvomerge/src/dvomergeHistory.c

    r34405 r34578  
    132132  int stat_result = stat (filename, &outstats);
    133133  if (stat_result) {
    134     if (errno == ENOENT) return NULL;
     134    if (errno == ENOENT) {
     135      dmhObject *history = NULL;
     136      ALLOCATE (history, dmhObject, 1);
     137      history->Nmerge = 0;
     138   
     139      // ALLOCATE full list
     140      ALLOCATE (history->size, off_t,  history->Nmerge);
     141      ALLOCATE (history->time, time_t, history->Nmerge);
     142      ALLOCATE (history->date, char *, history->Nmerge);
     143      return history;
     144    }
    135145    fprintf (stderr, "cannot read stats on output file %s\n", filename);
    136146    perror ("stats error message:");
Note: See TracChangeset for help on using the changeset viewer.