]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Document how to free krb5_cc_get_full_name result
authorGreg Hudson <ghudson@mit.edu>
Wed, 20 Jun 2012 15:14:08 +0000 (11:14 -0400)
committerGreg Hudson <ghudson@mit.edu>
Wed, 20 Jun 2012 15:14:08 +0000 (11:14 -0400)
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

src/clients/klist/klist.c
src/include/krb5/krb5.hin

index 503a1149d5ac83b3d57cca11030245ecbd55b828..9d8f0a83bc4641ec9a463c4c38cb1511e19e518a 100644 (file)
@@ -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;
 }
 
index 4d2864c2a72b87082665f1f0168a74e0963b48a6..de314a0179c2582315e7026244fc84cc7c766169 100644 (file)
@@ -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