IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 30, 2015, 1:49:15 PM (11 years ago)
Author:
eugene
Message:

error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ohana.20150429/src/libfits/matrix/F_uncompress_M.c

    r38334 r38339  
    261261
    262262    zdata = gfits_varlength_column_pointer (ftable, &zdef, row, &Nzdata);
    263     if (!zdata) return (FALSE);
     263    if (!zdata) ESCAPE;
    264264
    265265    // XXX not certain this is the correct place to do the swap (or if zdata_pixsize is
     
    267267
    268268    if (strcasecmp(cmptype, "GZIP_1")) {
    269       if (!gfits_byteswap_zdata (zdata, Nzdata, zdata_pixsize)) return (FALSE);
     269      if (!gfits_byteswap_zdata (zdata, Nzdata, zdata_pixsize)) ESCAPE;
    270270    }
    271271
    272272    // gfits_uncompress_data uncompresses from zdata to the temporary output buffer which must be allocated
    273273    // XXX the tile must not be > 2GB
    274     if (!gfits_uncompress_data ((char *)zdata, Nzdata, cmptype, optname, optvalue, Noptions, out, &Nout, odata_pixsize)) return (FALSE);
     274    if (!gfits_uncompress_data ((char *)zdata, Nzdata, cmptype, optname, optvalue, Noptions, out, &Nout, odata_pixsize)) ESCAPE;
    275275
    276276    // copy the uncompressed pixels into their correct locations           
    277     if (!gfits_distribute_data (matrix, odata_pixsize, out, Nout, otile, oblank, ztile, zblank, zscale, zzero)) return (FALSE);
     277    if (!gfits_distribute_data (matrix, odata_pixsize, out, Nout, otile, oblank, ztile, zblank, zscale, zzero)) ESCAPE;
    278278
    279279    // update the tile counters, carrying to the next dimension if needed
     
    287287    }
    288288  }
     289
     290  FREE (ztile);
     291  if (optname != NULL) {
     292    for (j = 0; j < Noptions; j++) {
     293      FREE (optname[j]);
     294      FREE (optvalue[j]);
     295    }
     296    FREE (optname);
     297    FREE (optvalue);
     298  }
     299  FREE (out);
     300  FREE (otile);
     301  FREE (ntile);
    289302  return (TRUE);
    290303}
Note: See TracChangeset for help on using the changeset viewer.