kadm5: Fix leak in randkey principal

This commit is contained in:
Nicolas Williams
2020-08-27 00:29:07 -05:00
parent 5b70a0cac6
commit 3b05166332

View File

@@ -406,6 +406,8 @@ out:
*new_keys = kblock; *new_keys = kblock;
*n_keys = num_keys; *n_keys = num_keys;
} else { } else {
for (i = 0; i < num_keys; ++i)
krb5_free_keyblock_contents(context->context, &kblock[i]);
free(kblock); free(kblock);
} }