[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
possible mem leak in gss_release_cred()?
In gss_release_cred(), krb5_cc_close() is called, but I think that might
be a source of memory leak.
I am linking an app with the Heimdal library, and have been busy for a
few days trying to plug all the leaks in that app. One of the leaks
seems to be caused by the series of calls, gss_acquire_cred() ->
krb5_cc_store_cred() -> mcc_store_cred() -> krb5_copy_creds_content(),
which allocates memory that is not freed when gss_release_cred() is
called. However, if I change krb5_cc_close() in gss_release_cred() to
krb5_cc_destroy(), it eventually calls mcc_destroy() to frees the memory
allocated in mcc_store_cred(), without any apparent bad effect.
So why is krb5_cc_close() called, not krb5_cc_destroy()? Is it correct
to use krb5_cc_destroy() instead? Thanks!
Zi-Bin Yang
DECRU, INC.