Fix memory leak in fcc_move
commit0b0559e19e7829dfb2c53149d9f832d043c846d2
authorTed Percival <ted.percival@quest.com>
Thu, 10 Dec 2009 22:14:10 +0000 (10 15:14 -0700)
committerLove Hornquist Astrand <lha@h5l.org>
Thu, 10 Dec 2009 22:34:50 +0000 (10 23:34 +0100)
tree616396fde4ef0c154dafc3075ba99b55c0acd3c2
parent90f851c0ce2bdbc5f2a65822d018af36c05828f3
Fix memory leak in fcc_move

This usually occurs when re-initializing a file credential
cache over the top of an existing one.

This was meant to be fixed in commit 48cb3aa by calling
fcc_destroy(), but that only unlinks the "from" file
(which was already renamed or unlinked) but still doesn't
free the in-memory credentials. Using fcc_close() instead of
fcc_destroy() frees the leaked in-memory credentials.

Signed-off-by: Love Hornquist Astrand <lha@h5l.org>
lib/krb5/fcache.c