krb5 commit: Remove null check in krb5_gss_duplicate_name()

Greg Hudson <[email protected]>
Newsgroups gmane.comp.encryption.kerberos.cvs
Message-ID <[email protected]>
https://github.com/krb5/krb5/commit/9fd7bc179f0bd74fc83c1edf0247dcfd87fc73e6
commit 9fd7bc179f0bd74fc83c1edf0247dcfd87fc73e6
Author: Robbie Harwood <[email protected]>
Date:   Fri Aug 30 11:19:52 2019 -0400

    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.

 src/lib/gssapi/krb5/duplicate_name.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/src/lib/gssapi/krb5/duplicate_name.c b/src/lib/gssapi/krb5/duplicate_name.c
index b88d97d..ea53e9c 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) {
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.