From: Greg Hudson Date: Wed, 20 Jun 2012 15:14:08 +0000 (-0400) Subject: Document how to free krb5_cc_get_full_name result X-Git-Tag: krb5-1.11-alpha1~496 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37b09d45192bd9d958d047dbb829d10f892b1fda;p=thirdparty%2Fkrb5.git Document how to free krb5_cc_get_full_name result Also, in klist, use the appropriate libkrb5 free functions for krb5_cc_get_full_name and krb5_unparse_name_results. Reported by Kevin Wasserman. ticket: 7179 --- diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c index 503a1149d5..9d8f0a83bc 100644 --- a/src/clients/klist/klist.c +++ b/src/clients/klist/klist.c @@ -386,8 +386,8 @@ list_ccache(krb5_ccache cache) status = 0; cleanup: krb5_free_principal(kcontext, princ); - free(princname); - free(ccname); + krb5_free_unparsed_name(kcontext, princname); + krb5_free_string(kcontext, ccname); return status; } diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index 4d2864c2a7..de314a0179 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -2265,6 +2265,8 @@ krb5_cc_get_name(krb5_context context, krb5_ccache cache); * @param [in] cache Credential cache handle * @param [out] fullname_out Full name of cache * + * Use krb5_free_string() to free @a fullname_out when it is no longer needed. + * * @version First introduced in 1.10 */ krb5_error_code KRB5_CALLCONV