IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 23284


Ignore:
Timestamp:
Mar 11, 2009, 4:37:54 PM (17 years ago)
Author:
Paul Price
Message:

Plugging memory leak.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfigDump.c

    r23283 r23284  
    6262
    6363    // Need to cull recipes from all cameras as well
    64     keep = psArrayAllocEmpty(1);
    6564    psMetadata *cameras = psMetadataLookupMetadata(NULL, config->system, "CAMERAS"); // Known cameras
    6665    if (!cameras) {
     
    7170    psMetadataIterator *iter = psMetadataIteratorAlloc(cameras, PS_LIST_HEAD, NULL); // Iterator for cameras
    7271    psMetadataItem *item;               // Item from iteration
     72    keep = psArrayAllocEmpty(1);
    7373    while ((item = psMetadataGetAndIncrement(iter))) {
    7474        psAssert(item->type == PS_DATA_METADATA, "Should only be metadata types on the camera list.");
     
    8282            psError(PS_ERR_UNKNOWN, false, "Unable to cull recipes for camera %s", item->name);
    8383            psFree(iter);
     84            psFree(keep);
    8485            return false;
    8586        }
    8687    }
    8788    psFree(iter);
     89    psFree(keep);
    8890
    8991    return true;
Note: See TracChangeset for help on using the changeset viewer.