Skip Menu |
 

Subject: krb5_stdccv3_remove mem leak
CC: lha@apple.com
Mem leak in ccapi/stdcc.c

Vendor's patch - LHA-6431228-krb5_stdccv3_remove-leaks.patch
Attaching the patch
diff -Nur -x '*~' -x '*.orig' -x '*.rej' -x '*.pbxbtree' -x '*.pbxindex' -x lha.mode1v3 -x lha.mode2v3 -x lha.pbxuser -x windows -x .DS_Store Kerberos.AEP-6.5fc1.orig/KerberosFramework/Kerberos5/Sources/lib/krb5/ccache/ccapi/stdcc.c Kerberos.AEP-6.5fc1/KerberosFramework/Kerberos5/Sources/lib/krb5/ccache/ccapi/stdcc.c
--- Kerberos.AEP-6.5fc1.orig/KerberosFramework/Kerberos5/Sources/lib/krb5/ccache/ccapi/stdcc.c 2008-12-08 14:02:55.000000000 -0800
+++ Kerberos.AEP-6.5fc1/KerberosFramework/Kerberos5/Sources/lib/krb5/ccache/ccapi/stdcc.c 2008-12-09 11:52:11.000000000 -0800
@@ -851,6 +851,8 @@
}
if (err == ccIteratorEnd) { err = ccErrCredentialsNotFound; }

+ if (iterator) cc_credentials_iterator_release (iterator);
+
if (!err) {
cache_changed ();
}
From: tsitkova@mit.edu
Subject: SVN Commit

Fixed memory leak in krb5_stdccv3_remove.

https://github.com/krb5/krb5/commit/e1aeb84e941ebfee21440438e82782e867a664ce
Commit By: tsitkova



Revision: 21362
Changed Files:
U trunk/src/lib/krb5/ccache/ccapi/stdcc.c
This patch appears to blow away the value of err from the loop. If, for
instance, the specified credential is not found, the function would
probably return successfully anyway because it was able to release the
iterator.

Also, if credentials were successfully removed but the iterator could
not be released, cache_changed() should probably still be called.