structure may have possible been used be freed..
rd_safe.c (krb5_rd_safe_basic): Fall through to the cleanup code at
the end, to make sure the decoded message in message is freed.
rd_req_dec.c (krb5_rd_req_decoded): Use krb5_copy_keyblock to copy
authent->subkey to auth_context->remote_subkey. Keeping them
separate avoids aliasing problems.
mk_req_ext.c (krb5_generate_authenticator): Fix memory leak. Don't
bash authent->subkey with key after carefully copying it using
krb5_copy_keyblock!
recvauth.c (krb5_recvauth): krb5_get_server_rcache() already opens the
rcache; doing it again merely causes a memory leak.
gen_subkey.c (krb5_generate_subkey): Eliminate memory leak.
krb5_init_random_key() does its own allocation of the
keyblock.
gc_via_tkt.c (krb5_kdcrep2creds): Fix memory leak.
srv_rcache.c (krb5_get_server_rcache): Fix memory leak.
rd_safe.c (krb5_rd_safe_basic): Fix memory leak.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6797
dc483132-0cff-0310-8789-
dd5450dbe970
+Sat Sep 16 01:23:14 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * sendauth.c (krb5_sendauth): Make sure the scratch credentials
+ structure may have possible been used be freed..
+
+ * rd_safe.c (krb5_rd_safe_basic): Fall through to the cleanup code
+ at the end, to make sure the decoded message in message is
+ freed.
+
+ * rd_req_dec.c (krb5_rd_req_decoded): Use krb5_copy_keyblock to
+ copy authent->subkey to auth_context->remote_subkey.
+ Keeping them separate avoids aliasing problems.
+
+ * mk_req_ext.c (krb5_generate_authenticator): Fix memory leak.
+ Don't bash authent->subkey with key after carefully
+ copying it using krb5_copy_keyblock!
+
+ * recvauth.c (krb5_recvauth): krb5_get_server_rcache() already
+ opens the rcache; doing it again merely causes a memory leak.
+
+Fri Sep 15 17:20:08 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * gen_subkey.c (krb5_generate_subkey): Eliminate memory leak.
+ krb5_init_random_key() does its own allocation of the
+ keyblock.
+
+ * gc_via_tkt.c (krb5_kdcrep2creds): Fix memory leak.
+
+ * srv_rcache.c (krb5_get_server_rcache): Fix memory leak.
+
+ * rd_safe.c (krb5_rd_safe_basic): Fix memory leak.
+
Tue Sep 12 12:40:30 1995 Ezra Peisach <epeisach@kangaroo.mit.edu>
* t_ser.c (ser_cksum_test): Work around an optimizer bug unser
goto cleanup_keyblock;
(*ppcreds)->ticket = *pdata;
+ free(pdata);
return 0;
cleanup_keyblock:
if ((retval = krb5_init_random_key(context, &eblock, key, &random_state)))
return(retval);
- *subkey = (krb5_keyblock *)malloc(sizeof(**subkey));
- if (!*subkey) {
- (void) krb5_finish_random_key(context, &eblock, &random_state);
- return ENOMEM;
- }
-
if ((retval = krb5_random_key(context, &eblock, random_state, subkey))) {
(void) krb5_finish_random_key(context, &eblock, &random_state);
krb5_xfree(*subkey);
return retval;
} else
authent->subkey = 0;
- authent->subkey = key;
authent->seq_number = seq_number;
authent->authorization_data = authorization;
}
(*auth_context)->remote_seq_number = (*auth_context)->authentp->seq_number;
- (*auth_context)->remote_subkey = (*auth_context)->authentp->subkey;
+ if ((*auth_context)->authentp->subkey) {
+ if ((retval = krb5_copy_keyblock(context,
+ (*auth_context)->authentp->subkey,
+ &((*auth_context)->remote_subkey))))
+ goto cleanup;
+ } else
+ (*auth_context)->remote_subkey = 0;
if ((retval = krb5_copy_keyblock(context, req->ticket->enc_part2->session,
&((*auth_context)->keyblock))))
goto cleanup;
*outbuf = message->user_data;
message->user_data.data = NULL;
-
- krb5_free_checksum(context, his_cksum);
- return 0;
-
+ retval = 0;
+
cleanup:
krb5_free_safe(context, message);
return retval;
/* everything is ok - return data to the user */
return 0;
-
+eh
error:;
krb5_xfree(outbuf->data);
return retval;
null_server.data = "default";
problem = krb5_get_server_rcache(context, &null_server, &rcache);
}
- if ((!problem) && krb5_rc_recover(context, rcache)) {
- /*
- * If the rc_recover() didn't work, then try
- * initializing the replay cache.
- */
- if ((problem = krb5_rc_initialize(context, rcache,
- krb5_clockskew))) {
- krb5_rc_close(context, rcache);
- rcache = NULL;
- }
- }
if (!problem)
problem = krb5_auth_con_setrcache(context, *auth_context, rcache);
}
}
error_return:
+ krb5_free_cred_contents(context, &creds);
if (credspout)
krb5_free_creds(context, credspout);
if (!ccache && use_ccache)
}
*rcptr = rcache;
- return 0;
+ rcache = 0;
+ retval = 0;
cleanup:
if (rcache)