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>
This commit is contained in:
Ted Percival
2009-12-10 15:14:10 -07:00
committed by Love Hornquist Astrand
parent 4835144bb2
commit bfcdeda3b4

View File

@@ -968,7 +968,7 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to)
close(fd);
}
fcc_destroy(context, from);
fcc_close(context, from);
return ret;
}