krb5 commit [krb5-1.17]: Fix memory leak in 'none' replay cache type

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/3d8dd08ebbb26d15bdf6cc740f5c46268e913a6f
commit 3d8dd08ebbb26d15bdf6cc740f5c46268e913a6f
Author: Corene Casper <[email protected]>
Date:   Sat Feb 16 00:49:26 2019 -0500

    Fix memory leak in 'none' replay cache type
    
    Commit 0f06098e2ab419d02e89a1ca6bc9f2828f6bdb1e fixed part of a memory
    leak in the 'none' replay cache type by freeing the outer container,
    but we also need to free the mutex.
    
    [[email protected]: wrote commit message]
    
    (cherry picked from commit af2a3115cb8feb5174151b4b40223ae45aa9db17)
    
    ticket: 8783
    version_fixed: 1.17.1

 src/lib/krb5/rcache/rc_none.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/lib/krb5/rcache/rc_none.c b/src/lib/krb5/rcache/rc_none.c
index e30aed0..0b2274d 100644
--- a/src/lib/krb5/rcache/rc_none.c
+++ b/src/lib/krb5/rcache/rc_none.c
@@ -50,6 +50,7 @@ krb5_rc_none_noargs(krb5_context ctx, krb5_rcache rc)
 static krb5_error_code KRB5_CALLCONV
 krb5_rc_none_close(krb5_context ctx, krb5_rcache rc)
 {
+    k5_mutex_destroy(&rc->lock);
     free (rc);
     return 0;
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.