]> git.ipfire.org Git - thirdparty/krb5.git/commit
Fix trivial KDC memory leak with test KDB module 734/head
authorsashan <anedvedicky@gmail.com>
Tue, 20 Feb 2018 21:35:51 +0000 (22:35 +0100)
committerGreg Hudson <ghudson@mit.edu>
Mon, 26 Feb 2018 22:06:39 +0000 (17:06 -0500)
commit14f03abd6d5dee71d45293c9369b6cfeaf8a1be5
tree6947933668d9e4e6998a97b962adfb81ec885a21
parent09685a2e571b9877269765ce2b7abf1cd5a23219
Fix trivial KDC memory leak with test KDB module

If a KDB module zeroes out the master key in its fetch_master_key()
method (as the test KDB module does), krb5_db_fetch_mkey() will copy
it, allocating one byte of memory for the contents.  The KDC will then
leak it on exit, as the length is zero.  Simplify master key
destruction using zapfree().

[ghudson@mit.edu: wrote commit message]
src/kdc/main.c