summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2012-06-20 11:14:08 -0400
committerGreg Hudson <ghudson@mit.edu>2012-06-20 11:14:08 -0400
commit37b09d45192bd9d958d047dbb829d10f892b1fda (patch)
tree3815c0c2d8844ff0d50337455b58c7fc7537dd0f /src
parent75836757c18bf3c5c6a3b0ab8e0d812014ae6f06 (diff)
downloadkrb5-37b09d45192bd9d958d047dbb829d10f892b1fda.tar.gz
krb5-37b09d45192bd9d958d047dbb829d10f892b1fda.tar.xz
krb5-37b09d45192bd9d958d047dbb829d10f892b1fda.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/clients/klist/klist.c4
-rw-r--r--src/include/krb5/krb5.hin2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c
index 503a1149d..9d8f0a83b 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 4d2864c2a..de314a017 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