From 5cbde5afbea5744749a7c8ce2531d918ddbbee18 Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Tue, 14 Apr 2009 21:07:37 +0000 Subject: [PATCH] pull up r22092 from trunk ------------------------------------------------------------------------ r22092 | hartmans | 2009-03-16 12:49:59 -0400 (Mon, 16 Mar 2009) | 4 lines Changed paths: M /trunk/src/lib/krb5/krb/auth_con.c 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. ticket: 6423 version_fixed: 1.7 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-7@22226 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/krb/auth_con.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/krb5/krb/auth_con.c b/src/lib/krb5/krb/auth_con.c index 40b3d95d0..8ef767a85 100644 --- a/src/lib/krb5/krb/auth_con.c +++ b/src/lib/krb5/krb/auth_con.c @@ -44,6 +44,8 @@ krb5_auth_con_init(krb5_context context, krb5_auth_context *auth_context) 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) -- 2.26.2