Allocate principal.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@2518 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-07-23 02:07:53 +00:00
parent 7b62473c23
commit cbdddcbe0b
2 changed files with 3 additions and 1 deletions

View File

@@ -127,6 +127,7 @@ DB_seq(krb5_context context, HDB *db, hdb_entry *entry, int flag)
data.data = key.data;
data.length = key.size;
entry->principal = malloc(sizeof(*entry->principal));
hdb_key2principal(context, &data, &entry->principal);
data.data = value.data;
data.length = value.size;

View File

@@ -131,7 +131,8 @@ NDBM_seq(krb5_context context, HDB *db, hdb_entry *entry, int first)
return KRB5_HDB_NOENTRY;
data.data = key.dptr;
data.length = key.dsize;
hdb_key2principal(context, &data, &entry->principal);
entry->principal = malloc(sizeof(*entry->principal));
hdb_key2principal(context, &data, entry->principal);
value = dbm_fetch(d, key);
/* krb5_data_free(&data); */
data.data = value.dptr;