From: Ezra Peisach Date: Sun, 12 Jan 2003 13:07:49 +0000 (+0000) Subject: * kdc_util.h, replay.c, main.c: Pass global krb5_context to X-Git-Tag: krb5-1.3-alpha1~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a79f9ab0248b3a5dcb6b962eb1d6fb1cacf30eb7;p=krb5.git * kdc_util.h, replay.c, main.c: Pass global krb5_context to kdc_free_lookaside() instead of per realm one - which has been freed by time invoked. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15113 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog index 0e58dece8..498a1efa1 100644 --- a/src/kdc/ChangeLog +++ b/src/kdc/ChangeLog @@ -1,3 +1,9 @@ +2003-01-12 Ezra Peisach + + * kdc_util.h, replay.c, main.c: Pass global krb5_context to + kdc_free_lookaside() instead of per realm one - which has been + freed by time invoked. + 2003-01-03 Ezra Peisach * main.c: On exit, free more allocated memory, including: diff --git a/src/kdc/kdc_util.h b/src/kdc/kdc_util.h index 11a916078..9abe3b860 100644 --- a/src/kdc/kdc_util.h +++ b/src/kdc/kdc_util.h @@ -158,7 +158,7 @@ krb5_boolean kdc_check_lookaside (krb5_data *, const krb5_fulladdr *, krb5_data **); void kdc_insert_lookaside (krb5_data *, const krb5_fulladdr *, krb5_data *); -void kdc_free_lookaside(void); +void kdc_free_lookaside(krb5_context); /* sock2p.c */ extern void sockaddr2p (const struct sockaddr *, char *, size_t, int *); diff --git a/src/kdc/main.c b/src/kdc/main.c index c338b53a8..4619124f2 100644 --- a/src/kdc/main.c +++ b/src/kdc/main.c @@ -845,10 +845,10 @@ int main(int argc, char **argv) if (kdc_realmlist) free(kdc_realmlist); #ifdef USE_RCACHE - (void) krb5_rc_close(kdc_context, kdc_rcache); + (void) krb5_rc_close(kcontext, kdc_rcache); #endif #ifndef NOCACHE - kdc_free_lookaside(); + kdc_free_lookaside(kcontext); #endif krb5_free_context(kcontext); return errout; diff --git a/src/kdc/replay.c b/src/kdc/replay.c index 18210b8c1..736abb73b 100644 --- a/src/kdc/replay.c +++ b/src/kdc/replay.c @@ -170,15 +170,15 @@ kdc_insert_lookaside(krb5_data *inpkt, const krb5_fulladdr *from, /* frees memory associated with the lookaside queue for memory profiling */ void -kdc_free_lookaside() +kdc_free_lookaside(krb5_context kcontext) { register krb5_kdc_replay_ent *eptr, *last, *hold; if (root_ptr.next) { for (last = &root_ptr, eptr = root_ptr.next; eptr; eptr = eptr->next) { - krb5_free_data(kdc_context, eptr->req_packet); - krb5_free_data(kdc_context, eptr->reply_packet); - krb5_free_address(kdc_context, eptr->addr); + krb5_free_data(kcontext, eptr->req_packet); + krb5_free_data(kcontext, eptr->reply_packet); + krb5_free_address(kcontext, eptr->addr); hold = eptr; last->next = eptr->next; eptr = last;