* kdc_util.h, replay.c, main.c: Pass global krb5_context to
authorEzra Peisach <epeisach@mit.edu>
Sun, 12 Jan 2003 13:07:49 +0000 (13:07 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sun, 12 Jan 2003 13:07:49 +0000 (13:07 +0000)
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

src/kdc/ChangeLog
src/kdc/kdc_util.h
src/kdc/main.c
src/kdc/replay.c

index 0e58dece847cb7e4b2a19bac63afb3a875c7dd60..498a1efa19e0209b1af864262996f72bb9920609 100644 (file)
@@ -1,3 +1,9 @@
+2003-01-12  Ezra Peisach  <epeisach@bu.edu>
+
+       * 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  <epeisach@bu.edu>
 
        * main.c: On exit, free more allocated memory, including:
index 11a916078dba61d324a40743982e670d203b3b11..9abe3b86046bc2b2b9ad7c6829d28c8a917f15e2 100644 (file)
@@ -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 *);
index c338b53a855c7f8fe46dbc3a05478c879314e6f1..4619124f292b72e7d2945d41d6c8bba38902fc8b 100644 (file)
@@ -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;
index 18210b8c1a4c0031e64576be9ed722271db68902..736abb73b251f3600e46ef36e587de6e9150037a 100644 (file)
@@ -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;