fcc_generate_new destroys locked mutex on error
authorTom Yu <tlyu@mit.edu>
Wed, 15 Apr 2009 21:00:24 +0000 (21:00 +0000)
committerTom Yu <tlyu@mit.edu>
Wed, 15 Apr 2009 21:00:24 +0000 (21:00 +0000)
pull up r22200 from trunk

 ------------------------------------------------------------------------
 r22200 | ghudson | 2009-04-13 15:29:14 -0400 (Mon, 13 Apr 2009) | 3 lines
 Changed paths:
    M /trunk/src/lib/krb5/ccache/cc_file.c

 krb5_fcc_generate_new was destroying a locked mutex in the err_out
 label, which is used for I/O failures.  Unlock the mutex first.

ticket: 6469
tags: pullup
target_version: 1.7
version_fixed: 1.7

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

src/lib/krb5/ccache/cc_file.c

index 9e54d1bdd0e1cb90d6931b59efa11350ea8b794a..23ece3e12319d78548e1b6f86c1faf5339afa1e5 100644 (file)
@@ -2129,6 +2129,7 @@ krb5_fcc_generate_new (krb5_context context, krb5_ccache *id)
 
 err_out:
      k5_cc_mutex_unlock(context, &krb5int_cc_file_mutex);
+     k5_cc_mutex_unlock(context, &data->lock);
      k5_cc_mutex_destroy(&data->lock);
      free(data->filename);
      free(data);