File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 8
8
* Darko Prenosil <Darko.Prenosil@finteh.hr>
9
9
* Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
10
10
*
11
- * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.92 2010/06/03 09:38:33 itagaki Exp $
11
+ * $PostgreSQL: pgsql/contrib/dblink/dblink.c,v 1.93 2010/06/09 00:56:02 itagaki Exp $
12
12
* Copyright (c) 2001-2010, PostgreSQL Global Development Group
13
13
* ALL RIGHTS RESERVED;
14
14
*
@@ -2237,9 +2237,14 @@ createNewConnection(const char *name, remoteConn *rconn)
2237
2237
HASH_ENTER , & found );
2238
2238
2239
2239
if (found )
2240
+ {
2241
+ PQfinish (rconn -> conn );
2242
+ pfree (rconn );
2243
+
2240
2244
ereport (ERROR ,
2241
2245
(errcode (ERRCODE_DUPLICATE_OBJECT ),
2242
2246
errmsg ("duplicate connection name" )));
2247
+ }
2243
2248
2244
2249
hentry -> rconn = rconn ;
2245
2250
strlcpy (hentry -> name , name , sizeof (hentry -> name ));
You can’t perform that action at this time.
0 commit comments