From 7016aa77499732446d7bc838b95810c8cdf5b15b Mon Sep 17 00:00:00 2001 From: Robbie Harwood Date: Fri, 30 Aug 2019 11:19:52 -0400 Subject: [PATCH] Remove null check in krb5_gss_duplicate_name() Within the krb5 mechanism, we require minor_status to be writable without checking. Remove the null check in krb5_gss_duplicate_name() to squash a forward-null defect. (cherry picked from commit 9fd7bc179f0bd74fc83c1edf0247dcfd87fc73e6) --- src/lib/gssapi/krb5/duplicate_name.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/gssapi/krb5/duplicate_name.c b/src/lib/gssapi/krb5/duplicate_name.c index b88d97d9d..ea53e9c0d 100644 --- a/src/lib/gssapi/krb5/duplicate_name.c +++ b/src/lib/gssapi/krb5/duplicate_name.c @@ -34,8 +34,7 @@ krb5_gss_duplicate_name(OM_uint32 *minor_status, const gss_name_t input_name, krb5_error_code code; krb5_gss_name_t princ, outprinc; - if (minor_status) - *minor_status = 0; + *minor_status = 0; code = krb5_gss_init_context(&context); if (code) {