IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 3, 2021, 3:05:40 PM (5 years ago)
Author:
eugene
Message:

plug various leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarpCleanup.c

    r37053 r41510  
    1414// Lists of file rules which we may need to save here
    1515static char *outputFiles[] = {
    16   "PSWARP.OUTPUT",
    17   "PSWARP.OUTPUT.MASK",
    18   "PSWARP.OUTPUT.VARIANCE",
    19   "PSWARP.OUTPUT.BKGMODEL",
    20   "PSWARP.OUTPUT.SOURCES",
    21   "PSPHOT.OUTPUT",
    22   "PSPHOT.RESID",
    23   "PSPHOT.BACKMDL",
    24   "PSPHOT.BACKMDL.STDEV",
    25   "PSPHOT.BACKGND",
    26   "PSPHOT.BACKSUB",
    27   "PSPHOT.PSF.SAVE",
    28   "SOURCE.PLOT.MOMENTS",
    29   "SOURCE.PLOT.PSFMODEL",
    30   "SOURCE.PLOT.APRESID",
    31   NULL
     16    "PSWARP.OUTPUT",
     17    "PSWARP.OUTPUT.MASK",
     18    "PSWARP.OUTPUT.VARIANCE",
     19    "PSWARP.OUTPUT.BKGMODEL",
     20    "PSWARP.OUTPUT.SOURCES",
     21    "PSPHOT.OUTPUT",
     22    "PSPHOT.RESID",
     23    "PSPHOT.BACKMDL",
     24    "PSPHOT.BACKMDL.STDEV",
     25    "PSPHOT.BACKGND",
     26    "PSPHOT.BACKSUB",
     27    "PSPHOT.PSF.SAVE",
     28    "SOURCE.PLOT.MOMENTS",
     29    "SOURCE.PLOT.PSFMODEL",
     30    "SOURCE.PLOT.APRESID",
     31    NULL
    3232};
    3333
     
    5353        psError(psErrorCodeLast(), false, "Unable to read files.");
    5454        pmFPAfileFreeSetStrict(false);
     55        psFree(view);
    5556        goto DONE;
    5657    }
     
    6364            psError(psErrorCodeLast(), false, "Unable to read files.");
    6465            pmFPAfileFreeSetStrict(false);
     66            psFree(view);
    6567            goto DONE;
    6668        }
     
    7375                psError(psErrorCodeLast(), false, "Unable to read files.");
    7476                pmFPAfileFreeSetStrict(false);
     77                psFree(view);
    7578                goto DONE;
    7679            }
     
    7982            psError(psErrorCodeLast(), false, "Unable to write files.");
    8083            pmFPAfileFreeSetStrict(false);
     84            psFree(view);
    8185            goto DONE;
    8286        }
     
    8589        psError(psErrorCodeLast(), false, "Unable to write files.");
    8690        pmFPAfileFreeSetStrict(false);
     91        psFree(view);
    8792        goto DONE;
    8893    }
     
    116121    psLibFinalize();
    117122
     123    psMemBlock **memblocks;
     124    int Nleaks = psMemCheckLeaks (0, &memblocks, stderr, false);
     125    fprintf (stderr, "Found %d leaks at %s\n", Nleaks, "ppImage");
     126
    118127DONE:
    119128    exitValue = pswarpExitCode(exitValue);
Note: See TracChangeset for help on using the changeset viewer.