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 88 * Darko Prenosil <Darko.Prenosil@finteh.hr>
99 * Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
1010 *
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 $
1212 * Copyright (c) 2001-2010, PostgreSQL Global Development Group
1313 * ALL RIGHTS RESERVED;
1414 *
@@ -2237,9 +2237,14 @@ createNewConnection(const char *name, remoteConn *rconn)
22372237 HASH_ENTER , & found );
22382238
22392239 if (found )
2240+ {
2241+ PQfinish (rconn -> conn );
2242+ pfree (rconn );
2243+
22402244 ereport (ERROR ,
22412245 (errcode (ERRCODE_DUPLICATE_OBJECT ),
22422246 errmsg ("duplicate connection name" )));
2247+ }
22432248
22442249 hentry -> rconn = rconn ;
22452250 strlcpy (hentry -> name , name , sizeof (hentry -> name ));
You can’t perform that action at this time.
0 commit comments