+2003-06-13 Tom Yu <tlyu@mit.edu>
+
+ * rd_rep.c (krb5_rd_rep): Free subkeys before replacing them, if
+ needed. This avoids a memory leak.
+
2003-06-11 Tom Yu <tlyu@mit.edu>
* srv_rcache.c (krb5_get_server_rcache): Octal escapes begin with
/* Set auth subkey */
if ((*repl)->subkey) {
+ if (auth_context->recv_subkey) {
+ krb5_free_keyblock(context, auth_context->recv_subkey);
+ auth_context->recv_subkey = NULL;
+ }
retval = krb5_copy_keyblock(context, (*repl)->subkey,
&auth_context->recv_subkey);
if (retval)
goto clean_scratch;
+ if (auth_context->send_subkey) {
+ krb5_free_keyblock(context, auth_context->send_subkey);
+ auth_context->send_subkey = NULL;
+ }
retval = krb5_copy_keyblock(context, (*repl)->subkey,
&auth_context->send_subkey);
if (retval) {