simplify?

This commit is contained in:
Love Hornquist Astrand
2009-11-22 12:51:52 -08:00
parent b9bb21f185
commit daa2048fd8

View File

@@ -281,6 +281,7 @@ hdb_entry_get_password(krb5_context context, HDB *db,
const hdb_entry *entry, char **p)
{
HDB_extension *ext;
char *str;
int ret;
ext = hdb_find_extension(entry, choice_HDB_extension_data_password);
@@ -329,17 +330,14 @@ hdb_entry_get_password(krb5_context context, HDB *db,
return 0;
}
{
char *name;
ret = krb5_unparse_name(context, entry->principal, &name);
if (ret == 0) {
krb5_set_error_message(context, ENOENT, "no password attributefor %s", name);
free(name);
} else
krb5_clear_error_message(context);
return ENOENT;
}
ret = krb5_unparse_name(context, entry->principal, &str);
if (ret == 0) {
krb5_set_error_message(context, ENOENT, "no password attributefor %s", str);
free(str);
} else
krb5_clear_error_message(context);
return ENOENT;
}
int