Don't call k5_mutex_destroy when krb5_rc_resolve_type fails, because that's
authorKen Raeburn <raeburn@mit.edu>
Thu, 8 Jun 2006 20:01:44 +0000 (20:01 +0000)
committerKen Raeburn <raeburn@mit.edu>
Thu, 8 Jun 2006 20:01:44 +0000 (20:01 +0000)
where the mutex would've been initialized.  Reported by Shawn Emery.

ticket: 3332

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@18089 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/rcache/rc_base.c

index e9f9505c5ff0e06f514c4498204ded511225f8f4..ad5c4e93cd13dd09fd9583a7697fd4db9593fe60 100644 (file)
@@ -119,7 +119,6 @@ krb5_rc_default(krb5_context context, krb5_rcache *id)
 
     if ((retval = krb5_rc_resolve_type(context, id, 
                                       krb5_rc_default_type(context)))) {
-       k5_mutex_destroy(&(*id)->lock);
        FREE(*id);
        return retval;
     }
@@ -157,7 +156,6 @@ krb5_error_code krb5_rc_resolve_full(krb5_context context, krb5_rcache *id, char
 
     if ((retval = krb5_rc_resolve_type(context, id,type))) {
        FREE(type);
-       k5_mutex_destroy(&(*id)->lock);
        FREE(*id);
        return retval;
     }