Skip Menu |
 

From: Paul Turgyan <pturgyan@umich.edu>
To: krb5-bugs@mit.edu
Subject: Memory leak when environment variable KRB5RCACHETYPE=none
Date: Mon, 11 Jan 2010 14:35:39 -0500

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] == '-')
I think this was a duplicate of #6514 and has been fixed since 1.7.1.