[1943] in Kerberos-V5-bugs
memory leak in kdb_cpw.c
daemon@ATHENA.MIT.EDU (Barry Jaspan)
Thu May 30 18:05:58 1996
Date: Thu, 30 May 96 18:05:29 -0400
From: "Barry Jaspan" <bjaspan@MIT.EDU>
To: krb5-bugs@MIT.EDU
krb5_decode_princ_contents (kdb_xdr.c:610) allocates an array of
krb5_key_data structures in the krb5_db_entry that it returns.
krb5_dbe_crk, and its relatives, alter the contents of that array when
changing the db_entry's keys. The functions all call cleanup_key_data
to free the *contents* of the old keys that are removed from the
db_entry, but cleanup_key_data does not free the array of
krb5_key_data structures itself.
cleanup_key_data is a static function inside kdb_cpw.c. We simply
need to verify that all callers expect it to free the key_data array
and then add the free() call to that function.