Fix for memory leak in krb5 1.3.5

Jeremy Allison jeremy.allison at hp.com
Thu Nov 4 16:30:52 EST 2004


Found using valgrind on Samba (fixing the latest salted key patch).
I couldn't find a kerberos bugzilla to send this fix to - how do
you report bugs/fixes to MIT ?

Do MIT use valgrind on Linux when developing kerberos ? It's very
good !

Jeremy Allison,
Samba Team.

--- lib/krb5/ccache/ccbase.c.orig       2004-11-04 13:18:01.000000000 -0800
+++ lib/krb5/ccache/ccbase.c    2004-11-04 13:18:08.000000000 -0800
@@ -113,6 +113,7 @@

      if ( pfxlen == 1 && isalpha(name[0]) ) {
          /* We found a drive letter not a prefix - use FILE: */
+       free(pfx);
          pfx = strdup("FILE:");
          if (!pfx)
              return ENOMEM;
@@ -121,6 +122,7 @@
      } else {
          resid = name + pfxlen + 1;

+       free(pfx);
          pfx = malloc (pfxlen+1);
          if (!pfx)
              return ENOMEM;


More information about the Kerberos mailing list