diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index e7571aaddbc..eaae83cc3a8 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -849,15 +849,13 @@ CheckPWChallengeAuth(Port *port, const char **logdetail) if (shadow_pass) pfree(shadow_pass); - - /* - * If get_role_password() returned error, return error, even if the - * authentication succeeded. - */ - if (!shadow_pass) + else { + /* + * If get_role_password() returned error, authentication better not + * have succeeded. + */ Assert(auth_result != STATUS_OK); - return STATUS_ERROR; } if (auth_result == STATUS_OK)