OSDN Git Service

Fix typo in PQconnectStartParams().
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Apr 2011 22:05:46 +0000 (18:05 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 2 Apr 2011 22:05:46 +0000 (18:05 -0400)
This would lead to leaking the PGconn structure after an error detected by
conninfo_array_parse(), as well as failing to return a useful error message
in such cases.  Backpatch to 9.0 where the error was introduced.

Joseph Adams

src/interfaces/libpq/fe-connect.c

index 4c59ca6..6eb6492 100644 (file)
@@ -446,7 +446,7 @@ PQconnectStartParams(const char **keywords,
        {
                conn->status = CONNECTION_BAD;
                /* errorMessage is already set */
-               return false;
+               return conn;
        }
 
        /*