krb5 commit: Set pointers to NULL after freeing them
Zhanna A Tsitkova
tsitkova at MIT.EDU
Mon Oct 15 16:09:47 EDT 2012
https://github.com/krb5/krb5/commit/b08dd7cbcafc4c89eda3ec7a7b416cc8cdd45cf0
commit b08dd7cbcafc4c89eda3ec7a7b416cc8cdd45cf0
Author: Zhanna Tsitkov <tsitkova at mit.edu>
Date: Mon Oct 15 16:14:24 2012 -0400
Set pointers to NULL after freeing them
src/kdc/do_as_req.c | 1 +
src/kdc/do_tgs_req.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/kdc/do_as_req.c b/src/kdc/do_as_req.c
index 81db767..4ca712d 100644
--- a/src/kdc/do_as_req.c
+++ b/src/kdc/do_as_req.c
@@ -723,6 +723,7 @@ process_as_req(krb5_kdc_req *request, krb5_data *req_pkt,
}
setflag(state->enc_tkt_reply.flags, TKT_FLG_ANONYMOUS);
krb5_free_principal(kdc_context, state->request->client);
+ state->request->client = NULL;
errcode = krb5_copy_principal(kdc_context, krb5_anonymous_principal(),
&state->request->client);
if (errcode) {
diff --git a/src/kdc/do_tgs_req.c b/src/kdc/do_tgs_req.c
index e9cb421..8a6d93c 100644
--- a/src/kdc/do_tgs_req.c
+++ b/src/kdc/do_tgs_req.c
@@ -252,6 +252,7 @@ tgt_again:
retval = prep_reprocess_req(request, &krbtgt_princ);
if (!retval) {
krb5_free_principal(kdc_context, request->server);
+ request->server = NULL;
retval = krb5_copy_principal(kdc_context, krbtgt_princ,
&(request->server));
if (!retval) {
More information about the cvs-krb5
mailing list