pullup from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 27 Dec 2004 21:05:29 +0000 (21:05 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 27 Dec 2004 21:05:29 +0000 (21:05 +0000)
ticket: 2854
target_version: 1.4
version_fixed: 1.4
component: krb5-libs

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-4@16982 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/ccache/ChangeLog
src/lib/krb5/ccache/cc_file.c

index e2929ea65a617263b9b0aa7e2540d72d1849f283..651e4a017685d848bae3d6f7d6a754463e5d9951 100644 (file)
@@ -1,3 +1,9 @@
+2004-12-25  Ezra Peisach  <epeisach@mit.edu>
+
+       * cc_file.c (krb5_fcc_close): Free the cache id.
+       (dereference): When removing fcc_set entry from list, free the
+       pointer as well.
+
 2004-12-16  Jeffrey Altman <jaltman@mit.edu>
         * cc_mslsa.c:
           Temporarily deactivate support for KerbSubmitTicketMessage   
index f247c425d2b24add276524b42102c204dc2e7d6a..20e6a177c59dc582d10c00ae4f8029e5ae6453d8 100644 (file)
@@ -1486,8 +1486,11 @@ static krb5_error_code dereference(krb5_context context, krb5_fcc_data *data)
     assert(*fccsp != NULL);
     (*fccsp)->refcount--;
     if ((*fccsp)->refcount == 0) {
+        struct fcc_set *temp;
        data = (*fccsp)->data;
+       temp = *fccsp;
        *fccsp = (*fccsp)->next;
+       free(temp);
        k5_mutex_unlock(&krb5int_cc_file_mutex);
        free(data->filename);
        zap(data->buf, sizeof(data->buf));
@@ -1517,6 +1520,7 @@ static krb5_error_code KRB5_CALLCONV
 krb5_fcc_close(krb5_context context, krb5_ccache id)
 {
      dereference(context, (krb5_fcc_data *) id->data);
+     krb5_xfree(id);
      return KRB5_OK;
 }