IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 14, 2008, 9:06:26 AM (18 years ago)
Author:
eugene
Message:

free memory on failures, return NULL for no refstars

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroAnalysis.c

    r16251 r17675  
    3838        return false;
    3939    }
     40    if (refs->n == 0) {
     41        psError(PSASTRO_ERR_REFSTARS, true, "no reference stars found");
     42        psFree(refs);
     43        return NULL;
     44    }
    4045
    4146    if (!psastroChooseRefstars (config, refs)) {
    4247        psError (PSASTRO_ERR_UNKNOWN, false, "failed to select reference data for chips\n");
     48        psFree(refs);
    4349        return false;
    4450    }
     
    5965
    6066    if (chipastro) {
    61       if (!psastroChipAstrom (config)) {
     67        if (!psastroChipAstrom (config)) {
    6268            psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform single chip astrometry\n");
     69            psFree(refs);
    6370            return false;
    6471        }
     
    6774        if (!psastroMosaicAstrom (config)) {
    6875            psError (PSASTRO_ERR_UNKNOWN, false, "failed to perform mosaic camera astrometry\n");
     76            psFree(refs);
    6977            return false;
    7078        }
Note: See TracChangeset for help on using the changeset viewer.