aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/libpq/auth.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c
index 4cb106cbe23..98b4225b607 100644
--- a/src/backend/libpq/auth.c
+++ b/src/backend/libpq/auth.c
@@ -818,16 +818,15 @@ CheckPWChallengeAuth(Port *port, 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;
}
+
return auth_result;
}