IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2006, 3:33:07 PM (20 years ago)
Author:
Paul Price
Message:

Plugging memory leaks --- done.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/rel10_ifa/psModules/src/astrom/pmFPAConstruct.c

    r6740 r6743  
    373373
    374374                // Put in the extension
    375                 if (chip->hdu) {
    376                     if (chip->hdu != hdu) {
    377                         psLogMsg(__func__, PS_LOG_WARN, "Overwriting HDU in chip %s\n", chipName);
    378                         psFree(chip->hdu);  // Make way!
    379                     }
    380                 } else {
     375                if (chip->hdu && chip->hdu != hdu) {
     376                    psLogMsg(__func__, PS_LOG_WARN, "Overwriting HDU in chip %s\n", chipName);
     377                    psFree(chip->hdu);  // Make way!
     378                    chip->hdu = NULL;
     379                }
     380                if (!chip->hdu) {
    381381                    chip->hdu = psMemIncrRefCounter(hdu);
    382382                }
     
    437437
    438438                // Put in the extension
    439                 if (cell->hdu) {
    440                     if (cell->hdu != hdu) {
    441                         psLogMsg(__func__, PS_LOG_WARN, "Overwriting HDU in chip %s, cell %s\n", chipName,
    442                                  cellName);
    443                         psFree(cell->hdu);
    444                     }
    445                 } else {
     439                if (cell->hdu && cell->hdu != hdu) {
     440                    psLogMsg(__func__, PS_LOG_WARN, "Overwriting HDU in chip %s, cell %s\n", chipName,
     441                             cellName);
     442                    psFree(cell->hdu);
     443                    cell->hdu = NULL;
     444                }
     445                if (! cell->hdu) {
    446446                    cell->hdu = psMemIncrRefCounter(hdu);
    447447                }
Note: See TracChangeset for help on using the changeset viewer.