From: John Kohl Date: Thu, 21 Feb 1991 15:36:52 +0000 (+0000) Subject: plug memory leaks X-Git-Tag: krb5-1.0-alpha4~215 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6cccd8915646bd2d6091aedd17a80a8ca7eee854;p=krb5.git plug memory leaks git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1757 dc483132-0cff-0310-8789-dd5450dbe970 --- 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; }