Skip to content

Commit 85a6ad3

Browse files
committed
Fix minor bugs in commit 30bf468 et al.
Coverity complained that the "else" added to fillPGconn() was unreachable, which it was. Remove the dead code. In passing, rearrange the tests so as not to bother trying to fetch values for options that can't be assigned. Pre-9.3 did not have that issue, but it did have a "return" that should be "goto oom_error" to ensure that a suitable error message gets filled in.
1 parent 6a694bb commit 85a6ad3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,7 @@ fillPGconn(PGconn *conn, PQconninfoOption *connOptions)
592592
free(conn->sslmode);
593593
conn->sslmode = strdup("require");
594594
if (!conn->sslmode)
595-
return false;
595+
goto oom_error;
596596
}
597597
#endif
598598
#if defined(KRB5) || defined(ENABLE_GSS) || defined(ENABLE_SSPI)
@@ -694,7 +694,6 @@ connectOptions2(PGconn *conn)
694694
conn->pgpass = strdup(DefaultPassword);
695695
if (!conn->pgpass)
696696
goto oom_error;
697-
698697
}
699698
else
700699
conn->dot_pgpass_used = true;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy