pullup from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 18 Jul 2005 23:32:18 +0000 (23:32 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 18 Jul 2005 23:32:18 +0000 (23:32 +0000)
ticket: 3098
version_fixed: 1.4.2
component: krb5-libs

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

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

index 47e675928e3601a96d5e12f4d1e55f375d78a8ec..e015116a51b375d562c7a9493a22ba7b84c2e65f 100644 (file)
@@ -1,3 +1,7 @@
+2005-06-15  Ken Raeburn  <raeburn@mit.edu>
+
+       * cc_file.c (dereference): Fix test is list-walking loop.
+
 2005-01-13  Ken Raeburn  <raeburn@mit.edu>
 
        * cc_file.c (struct _krb5_fcc_data): Fields disk_file_lock,
index 0529e4b21219a2efa93d9a0cb4e200b9f2cb9c97..cc8bccef9ec5ff5f96f0de8109664a37a4a81b0b 100644 (file)
@@ -1461,10 +1461,11 @@ static krb5_error_code dereference(krb5_context context, krb5_fcc_data *data)
     kerr = k5_mutex_lock(&krb5int_cc_file_mutex);
     if (kerr)
        return kerr;
-    for (fccsp = &fccs; *fccsp == NULL; fccsp = &(*fccsp)->next)
+    for (fccsp = &fccs; *fccsp != NULL; fccsp = &(*fccsp)->next)
        if ((*fccsp)->data == data)
            break;
     assert(*fccsp != NULL);
+    assert((*fccsp)->data == data);
     (*fccsp)->refcount--;
     if ((*fccsp)->refcount == 0) {
         struct fcc_set *temp;