kadmin: Fix leak of dup context

This commit is contained in:
Nicolas Williams
2022-03-23 23:39:21 -05:00
parent 990250e462
commit 6b64ae2cde
5 changed files with 13 additions and 1 deletions

View File

@@ -160,6 +160,7 @@ ext_keytab(struct ext_keytab_options *opt, int argc, char **argv)
const char *enctypes;
size_t i;
data.kadm_handle = NULL;
ret = kadm5_dup_context(kadm_handle, &data.kadm_handle);
if (ret)
krb5_err(context, 1, ret, "Could not duplicate kadmin connection");