IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 17, 2006, 6:04:14 PM (20 years ago)
Author:
jhoblitt
Message:

fix mem corruption & leaks

File:
1 edited

Legend:

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

    r10037 r10074  
    4040
    4141bool pxCreateTables(pxConfig *config) {
    42     bool            status = true;
    43 
    4442    PS_ASSERT_PTR_NON_NULL(config, false);
    4543
     
    5250    }
    5351#endif
     52
     53    bool            status = true;
    5454    CREATE_TABLE(summitExpCreateTable);
    5555    CREATE_TABLE(summitImfileCreateTable);
     
    102102    fgets (line, 128, stdin);
    103103    sscanf (line, "%s", answer);
    104     if (strcmp (answer, "YES")) goto escape;
     104    if (strcmp (answer, "YES"))  {
     105        psError(PS_ERR_UNKNOWN, true, "tables NOT deleleted");
     106        return false;
     107    }
    105108
    106109    fprintf (stdout, "enter dbh connection password: ");
     
    111114        bool status;
    112115        psString dbPassword = psMetadataLookupStr(&status, config->modules->site, "DBPASSWORD");
    113         if (strcmp (answer, dbPassword)) goto escape;
    114         psFree(dbPassword);
     116        if (strcmp (answer, dbPassword)) {
     117            psError(PS_ERR_UNKNOWN, true, "tables NOT deleleted");
     118            return false;
     119        }
    115120    }
    116121
     
    151156
    152157    return status;
    153 
    154 escape:
    155     // XXX fix psMetadataLookupStr() to inc ref count
    156     // psFree(dbPassword);
    157     fprintf (stdout, "tables NOT deleted\n");
    158 
    159     return false;
    160158}
Note: See TracChangeset for help on using the changeset viewer.