+2005-09-22 Tom Yu <tlyu@mit.edu>
+
+ * mk_req_ext.c (krb5int_generate_and_save_subkey): Check for and
+ free pre-existing subkeys before clobbering the pointers. This
+ fixes some memory leaks.
+
2005-08-23 Ezra Peisach <epeisach@mit.edu>
* t_ser.c (ser_kcontext_test): Remove statement declaring an
d.data = (char *) &rnd_data;
(void) krb5_c_random_add_entropy (context, KRB5_C_RANDSOURCE_TIMING, &d);
+ if (auth_context->send_subkey)
+ krb5_free_keyblock(context, auth_context->send_subkey);
if ((retval = krb5_generate_subkey(context, keyblock, &auth_context->send_subkey)))
return retval;
+
+ if (auth_context->recv_subkey)
+ krb5_free_keyblock(context, auth_context->recv_subkey);
retval = krb5_copy_keyblock(context, auth_context->send_subkey,
&auth_context->recv_subkey);
if (retval) {