pull up r18206 from trunk
authorTom Yu <tlyu@mit.edu>
Mon, 26 Jun 2006 02:50:45 +0000 (02:50 +0000)
committerTom Yu <tlyu@mit.edu>
Mon, 26 Jun 2006 02:50:45 +0000 (02:50 +0000)
 r18206@cathode-dark-space:  tlyu | 2006-06-22 18:23:02 -0400
 ticket: 3924
 tags: pullup

  * src/lib/krb5/krb/srv_rcache.c (krb5_get_server_rcache): Apply
  patch from Rainer Weikusat to avoid double-free when
  rc_resolve_full() fails due to misconfiguration.

ticket: 3924
version_fixed: 1.5

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

src/lib/krb5/krb/srv_rcache.c

index 898b3f6878235ede926d5d7ee749ca371ee81090..da51b70b7d5805e67f38f8269c484f38c3561826 100644 (file)
@@ -115,17 +115,13 @@ krb5_get_server_rcache(krb5_context context, const krb5_data *piece,
     retval = krb5_rc_recover_or_initialize(context, rcache, context->clockskew);
     if (retval) {
        krb5_rc_close(context, rcache);
-       rcache = 0;
        goto cleanup;
     }
 
     *rcptr = rcache;
-    rcache = 0;
     retval = 0;
 
 cleanup:
-    if (rcache)
-       krb5_xfree(rcache);
     if (cachename)
        krb5_xfree(cachename);
     return retval;