In kg_acceptor_princ, make Coverity happy by using a different test to
authorGreg Hudson <ghudson@mit.edu>
Mon, 14 Feb 2011 00:13:17 +0000 (00:13 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 14 Feb 2011 00:13:17 +0000 (00:13 +0000)
determine if we should set (*princ_out)->type.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24638 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/naming_exts.c

index d1940123fee2af088391dcbf06b7f244cb986460..986717016ce1998d0c1be87d68acb3397dcc364b 100644 (file)
@@ -186,7 +186,7 @@ kg_acceptor_princ(krb5_context context, krb5_gss_name_t name,
 
     code = krb5_build_principal(context, princ_out, 0, "", name->service, host,
                                 (char *)NULL);
-    if (code == 0)
+    if (*princ_out != NULL)
         (*princ_out)->type = KRB5_NT_SRV_HST;
     free(tmp);
     return code;