svn rev #22092: trunk/src/lib/krb5/krb/

hartmans@MIT.EDU hartmans at MIT.EDU
Mon Mar 16 12:50:00 EDT 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=22092
Commit By: hartmans
Log Message:
ticket: 6423
Subject: krb5_auth_con_free should support freeing a null auth_context without segfault.

If the input auth_con is NULL, return success.


Changed Files:
U   trunk/src/lib/krb5/krb/auth_con.c
Modified: trunk/src/lib/krb5/krb/auth_con.c
===================================================================
--- trunk/src/lib/krb5/krb/auth_con.c	2009-03-16 16:47:28 UTC (rev 22091)
+++ trunk/src/lib/krb5/krb/auth_con.c	2009-03-16 16:49:59 UTC (rev 22092)
@@ -44,6 +44,8 @@
 krb5_error_code KRB5_CALLCONV
 krb5_auth_con_free(krb5_context context, krb5_auth_context auth_context)
 {
+    if (auth_context == NULL)
+	return 0;
     if (auth_context->local_addr) 
 	krb5_free_address(context, auth_context->local_addr);
     if (auth_context->remote_addr) 




More information about the cvs-krb5 mailing list