Do not attempt to free uninitialized pointer when
kadm5_randkey_principal fails. This would most likely be encountered when one does not have change-password rights, but uses one of the `--random-key' or `--random-password' options of the ank command. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11036 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -149,7 +149,8 @@ add_one_principal (const char *name,
|
|||||||
}
|
}
|
||||||
for(i = 0; i < n_keys; i++)
|
for(i = 0; i < n_keys; i++)
|
||||||
krb5_free_keyblock_contents(context, &new_keys[i]);
|
krb5_free_keyblock_contents(context, &new_keys[i]);
|
||||||
free(new_keys);
|
if (n_keys > 0)
|
||||||
|
free(new_keys);
|
||||||
kadm5_get_principal(kadm_handle, princ_ent, &princ,
|
kadm5_get_principal(kadm_handle, princ_ent, &princ,
|
||||||
KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES);
|
KADM5_PRINCIPAL | KADM5_KVNO | KADM5_ATTRIBUTES);
|
||||||
princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
|
princ.attributes &= (~KRB5_KDB_DISALLOW_ALL_TIX);
|
||||||
|
Reference in New Issue
Block a user