Misc fixes (coverity)

This commit is contained in:
Nicolas Williams
2016-11-18 22:21:37 -06:00
parent 4b6bd40106
commit 52a562a3a4
10 changed files with 23 additions and 18 deletions

View File

@@ -129,6 +129,7 @@ do_list(struct list_options *opt, const char *keytab_str)
if (entry.aliases) {
unsigned int i;
struct rk_strpool *p = NULL;
char *s;
for (i = 0; i< entry.aliases->len; i++) {
krb5_unparse_name_fixed(context, entry.principal, buf, sizeof(buf));
@@ -136,7 +137,8 @@ do_list(struct list_options *opt, const char *keytab_str)
i + 1 < entry.aliases->len ? ", " : "");
}
rtbl_add_column_entry_by_id(table, 5, rk_strpoolcollect(p));
rtbl_add_column_entry_by_id(table, 5, (s = rk_strpoolcollect(p)));
free(s);
}
krb5_kt_free_entry(context, &entry);