From 2095b2ef6498087434ed12dc89c23e4739829f81 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 16 Mar 2009 16:49:59 +0000 Subject: [PATCH] krb5_auth_con_free should support freeing a null auth_context without segfault If the input auth_con is NULL, return success. ticket: 6423 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22092 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 ea4ef3a0c..41a2578e0 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