[krbdev.mit.edu #6631] Memory leak when environment variable KRB5RCACHETYPE=none

Paul Turgyan via RT rt-comment at krbdev.mit.edu
Mon Jan 11 15:08:29 EST 2010


When the replay cache is set to "none"  using the environment variable  
KRB5RCACHETYPE=none
a memory leak occurs.  This was detected when using OpenLDAP, Cyrus- 
SASL, and GSSAPI authentication.


The following patch fixes the problem


diff -ur krb5-1.6.3/src/lib/krb5/krb/srv_rcache.c krb5-1.6.3um1/src/ 
lib/krb5/krb
/srv_rcache.c
*** krb5-1.6.3/src/lib/krb5/krb/srv_rcache.c    Fri Jun 30 01:59:46 2006
--- krb5-1.6.3um1/src/lib/krb5/krb/srv_rcache.c Mon Dec  7 16:19:02 2009
***************
*** 54,59 ****
--- 54,64 ----

       cachetype = krb5_rc_default_type(context);

+     if (strncmp (cachetype, "none", 4) == 0) {
+       *rcptr = 0;
+       return 0;
+     }
+
       len = piece->length + 3 + 1;
       for (i = 0; i < piece->length; i++) {
         if (piece->data[i] == '-')





More information about the krb5-bugs mailing list