[26629] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Document how to free krb5_cc_get_full_name result

daemon@ATHENA.MIT.EDU (Greg Hudson)
Wed Jun 20 11:14:36 2012

Date: Wed, 20 Jun 2012 11:14:32 -0400
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201206201514.q5KFEWib000587@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/37b09d45192bd9d958d047dbb829d10f892b1fda
commit 37b09d45192bd9d958d047dbb829d10f892b1fda
Author: Greg Hudson <ghudson@mit.edu>
Date:   Wed Jun 20 11:14:08 2012 -0400

    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

 src/clients/klist/klist.c |    4 ++--
 src/include/krb5/krb5.hin |    2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/clients/klist/klist.c b/src/clients/klist/klist.c
index 503a114..9d8f0a8 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 4d2864c..de314a0 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
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post