+2001-11-19 Ezra Peisach <epeisach@mit.edu>
+
+ * kdb5_verify.c (main): Use krb5_free_unparsed_name() to free up
+ memory.
+ (check_princ): Use krb5_free_data_contents() and
+ krb5_free_principal() to cleanup memory leak.
+
2001-10-09 Ken Raeburn <raeburn@mit.edu>
* kdb5_verify.c: Make prototypes unconditional.
com_err(progname, retval, "while closing database");
exit(1);
}
+
+ if (str_master_princ) {
+ krb5_free_unparsed_name(context, str_master_princ);
+ }
+ krb5_free_context(context);
exit(0);
}
if ((retval = krb5_principal2salt(context, princ, &salt))) {
com_err(progname, retval, "while converting principal to salt for '%s'", princ_name);
+ krb5_free_principal(context, princ);
goto out;
}
&pwd_key, &pwd, &salt))) {
com_err(progname, retval, "while converting password to key for '%s'",
princ_name);
+ krb5_free_data_contents(context, &salt);
+ krb5_free_principal(context, princ);
goto out;
}
+ krb5_free_data_contents(context, &salt);
if ((retval = krb5_db_get_principal(context, princ, &kdbe,
&nprincs, &more))) {
com_err(progname, retval, "while attempting to verify principal's existence");
+ krb5_free_principal(context, princ);
goto out;
}
+ krb5_free_principal(context, princ);
if (nprincs != 1) {
com_err(progname, 0, "Found %d entries db entry for %s.\n", nprincs,