From 6cccd8915646bd2d6091aedd17a80a8ca7eee854 Mon Sep 17 00:00:00 2001 From: John Kohl Date: Thu, 21 Feb 1991 15:36:52 +0000 Subject: [PATCH] plug memory leaks git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1757 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/verify_mky.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/kdb/verify_mky.c b/src/lib/kdb/verify_mky.c index 616b740a8..dd26b96c5 100644 --- a/src/lib/kdb/verify_mky.c +++ b/src/lib/kdb/verify_mky.c @@ -54,10 +54,12 @@ krb5_encrypt_block *eblock; /* do any necessary key pre-processing */ if (retval = krb5_process_key(eblock, mkey)) { + krb5_db_free_principal(&master_entry, nprinc); return(retval); } if (retval = krb5_kdb_decrypt_key(eblock, &master_entry.key, &tempkey)) { (void) krb5_finish_key(eblock); + krb5_db_free_principal(&master_entry, nprinc); return retval; } if (memcmp((char *)mkey->contents, (char *)tempkey.contents, @@ -66,6 +68,8 @@ krb5_encrypt_block *eblock; (void) krb5_finish_key(eblock); } else retval = krb5_finish_key(eblock); + + krb5_db_free_principal(&master_entry, nprinc); return retval; } -- 2.26.2