lib/kadm5 kadm5_c_randkey_principal allow keyblock cleanup on error

the code to perform cleanup is present but an overzealous goto out
precludes it from being called. break from our for loop in event of error
and allow cleanup to take place
This commit is contained in:
Daria Phoebe Brashear
2020-01-10 13:08:43 -05:00
committed by Nico Williams
parent c2a7041402
commit efba1c21e9

View File

@@ -132,7 +132,7 @@ kadm5_c_randkey_principal(void *server_handle,
for (i = 0; ret == 0 && i < tmp; i++) {
ret = krb5_ret_keyblock(sp, &k[i]);
if (ret)
goto out;
break;
}
if (ret == 0 && n_keys && new_keys) {
*n_keys = tmp;