Fix incorrect change in dblink introduced by the previous commit
authorItagaki Takahiro <[email protected]>
Thu, 10 Jun 2010 00:41:23 +0000 (00:41 +0000)
committerItagaki Takahiro <[email protected]>
Thu, 10 Jun 2010 00:41:23 +0000 (00:41 +0000)
"Fix connection leak in dblink".

contrib/dblink/dblink.c

index 69997511abd7b179b1bc8c93b1c3209c1936c9eb..4cc7b1e4a3f181954b0176f5ee24fcec97d22d89 100644 (file)
@@ -2125,8 +2125,8 @@ createNewConnection(const char *name, remoteConn * con)
 
        if (found)
        {
-               PQfinish(rconn->conn);
-               pfree(rconn);
+               PQfinish(con->con);
+               pfree(con);
 
                ereport(ERROR,
                                (errcode(ERRCODE_DUPLICATE_OBJECT),