r18283@cathode-dark-space: tlyu | 2006-06-29 23:57:20 -0400
ticket: 3962
tags: pullup
* src/lib/krb5/krb/srv_rcache.c (krb5_get_server_rcache): Adapted
patch from Shawn Emery to set rcache = 0 in case of
krb5_rc_resolve_full failure because krb5_rc_resolve_full frees
but doesn't null rcache. Also restore free of rcache in cleanup
code. Continue to not null rcache in failure on
krb5_rc_recover_or_initialize because krb5_rc_close doesn't free
rcache.
ticket: 3962
version_fixed: 1.5
git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-5@18284
dc483132-0cff-0310-8789-
dd5450dbe970
cachename[p++] = '\0';
retval = krb5_rc_resolve_full(context, &rcache, cachename);
- if (retval)
+ if (retval) {
+ rcache = 0;
goto cleanup;
+ }
/*
* First try to recover the replay cache; if that doesn't work,
}
*rcptr = rcache;
+ rcache = 0;
retval = 0;
cleanup:
+ if (rcache)
+ krb5_xfree(rcache);
if (cachename)
krb5_xfree(cachename);
return retval;