IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2006, 11:58:12 AM (20 years ago)
Author:
jhoblitt
Message:

memory leak fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/dettoolConfig.c

    r7615 r7657  
    1818    if (!config->modules) {
    1919        psError(PS_ERR_UNKNOWN, false, "Can't find site configuration");
    20         exit(EXIT_FAILURE);
     20        goto FAIL;
    2121    }
    2222
     
    394394        psFree(rerunArgs);
    395395
    396         exit(EXIT_FAILURE);
     396        goto FAIL;
    397397    }
    398398
     
    423423        if (!psMetadataAddStr(config->where, PS_LIST_TAIL, #name, 0, "==", str)) {\
    424424            psError(PS_ERR_UNKNOWN, false, "failed to add item " #name); \
    425             exit(EXIT_FAILURE); \
     425            goto FAIL; \
    426426        } \
    427427    }
     
    440440        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "iteration", 0, "==", n)) {
    441441            psError(PS_ERR_UNKNOWN, false, "failed to add item iteration");
    442             exit(EXIT_FAILURE);
     442            goto FAIL;
    443443        }
    444444    }
     
    450450        if (!psMetadataAddStr(config->where, PS_LIST_TAIL, "camera", 0, "==", str)) {
    451451            psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
    452             exit(EXIT_FAILURE);
     452            goto FAIL;
    453453        }
    454454    }
     
    458458        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "imfiles", 0, "==", n)) {
    459459            psError(PS_ERR_UNKNOWN, false, "failed to add item imfiles");
    460             exit(EXIT_FAILURE);
     460            goto FAIL;
    461461        }
    462462    }
     
    467467        if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p1_version", 0, "==", n)) {
    468468            psError(PS_ERR_UNKNOWN, false, "failed to add item p1_version");
    469             exit(EXIT_FAILURE);
     469            goto FAIL;
    470470        }
    471471    }
     
    473473        if (!psMetadataAddBool(config->where, PS_LIST_TAIL, "accept", 0, "==", boolean)) {
    474474            psError(PS_ERR_UNKNOWN, false, "failed to add item accept");
    475             exit(EXIT_FAILURE);
     475            goto FAIL;
    476476        }
    477477    }
     
    489489    if (!config->dbh) {
    490490        psError(PS_ERR_UNKNOWN, false, "Can't configure database");
    491         exit(EXIT_FAILURE);
     491        goto FAIL;
    492492    }
    493493
     
    497497
    498498    return config;
     499
     500FAIL:
     501    psLibFinalize();
     502    exit(EXIT_FAILURE);
    499503}
Note: See TracChangeset for help on using the changeset viewer.