* error_message.c (com_err_terminate): Free heap storage in et_list_dynamic
authorKen Raeburn <raeburn@mit.edu>
Thu, 29 Apr 2004 06:29:47 +0000 (06:29 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 29 Apr 2004 06:29:47 +0000 (06:29 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16279 dc483132-0cff-0310-8789-dd5450dbe970

src/util/et/ChangeLog
src/util/et/error_message.c

index d0a25cef4ea31841e44b991e6f48b8fe59207993..2b3922a392ae8ca62d12dc0965ea6b6e60e20c8c 100644 (file)
@@ -2,6 +2,9 @@
 
        * Makefile.in (LIBINITFUNC, LIBFINIFUNC): New variables.
 
+       * error_message.c (com_err_terminate): Free heap storage in
+       et_list_dynamic.
+
 2004-04-24  Ken Raeburn  <raeburn@mit.edu>
 
        Delete support for old globally-visible linked list, necessary
index cf8fe53aa72a5d77fec5c7bc64c5f69ef443cd35..44a73b6c6e975f83ec5c6bbd14e3d949fa3184b7 100644 (file)
@@ -54,9 +54,14 @@ int com_err_initialize(void)
 
 void com_err_terminate(void)
 {
+    struct dynamic_et_list *e, *enext;
     if (! INITIALIZER_RAN(com_err_initialize) || PROGRAM_EXITING())
        return;
     k5_mutex_destroy(&et_list_lock);
+    for (e = et_list_dynamic; e; e = enext) {
+       enext = e->next;
+       free(e);
+    }
 }
 
 #ifndef DEBUG_TABLE_LIST