kadm5: Fix crash in principal creation

This manifests with an upcomming patch that adds support for
aliasing of namespaces.
This commit is contained in:
Nicolas Williams
2021-10-30 00:42:02 -05:00
parent 66dabe7d39
commit 6cbe35ad5d

View File

@@ -977,11 +977,11 @@ kadm5_log_create(kadm5_server_context *context, hdb_entry *entry)
hdb_entry_ex ent, existing;
kadm5_log_context *log_context = &context->log_context;
memset(&existing, 0, sizeof(existing));
memset(&ent, 0, sizeof(ent));
ent.ctx = 0;
ent.free_entry = 0;
ent.entry = *entry;
existing = ent;
/*
* Do not allow creation of concrete entries within namespaces unless