IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 20, 2006, 7:12:27 PM (19 years ago)
Author:
jhoblitt
Message:

fix mem leaks

File:
1 edited

Legend:

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

    r9392 r10120  
    3838    if (! config->modules) {
    3939        psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n");
    40         exit(EXIT_FAILURE);
     40        goto FAIL;
    4141    }
    4242
     
    6262        printf("Usage: %s -uri <uri> -filesetid <id>\n\n", argv[0]);
    6363        psArgumentHelp(args);
    64         psFree(config);
    65         exit(EXIT_FAILURE);
     64        psFree(args);
     65        goto FAIL;
    6666    }
    6767
     
    7474    if(!config->dbh) {
    7575        psError(PS_ERR_UNKNOWN, false, "Can't connect to db\n");
    76         psFree(config);
    77         exit(EXIT_FAILURE);
     76        goto FAIL;
    7877    }
    7978
    8079    return config;
     80
     81FAIL:
     82    psFree(config);
     83    pmConfigDone();
     84    psLibFinalize();
     85    exit(EXIT_FAILURE);
    8186}
Note: See TracChangeset for help on using the changeset viewer.