s4:auth/gensec/gensec_krb5.c - remove a pointless "nt_status" test
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 4 Dec 2010 15:36:27 +0000 (16:36 +0100)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Sat, 4 Dec 2010 15:40:25 +0000 (16:40 +0100)
There is no operation which sets the "nt_status" before the "if".

source4/auth/gensec/gensec_krb5.c

index b0ab3f61e7090c396a28b8e784b18e1a548d6137..deb22adb2d637d0eb9dcb9200d94695258c0ab4e 100644 (file)
@@ -670,15 +670,10 @@ static NTSTATUS gensec_krb5_session_info(struct gensec_security *gensec_security
                } else {
                        DEBUG(1, ("Unable to find PAC in ticket from %s, failing to allow access\n",
                                  principal_string));
-                       return NT_STATUS_ACCESS_DENIED;
-               }
-
-               krb5_free_principal(context, client_principal);
-               free(principal_string);
-               
-               if (!NT_STATUS_IS_OK(nt_status)) {
+                       free(principal_string);
+                       krb5_free_principal(context, client_principal);
                        talloc_free(mem_ctx);
-                       return nt_status;
+                       return NT_STATUS_ACCESS_DENIED;
                }
        } else {
                /* Found pac */