Skip Menu |

Subject: krb5_stdccv3_remove mem leak
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 ();
Subject: SVN Commit

Fixed memory leak in krb5_stdccv3_remove.
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

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