fix double free in postgresql resourcepool if pg_check_connection fails

Sun, 25 Sep 2022 10:47:49 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 25 Sep 2022 10:47:49 +0200
changeset 389
c6c5638e97b8
parent 388
30d29ef5b79a
child 390
144332e23ffd

fix double free in postgresql resourcepool if pg_check_connection fails

src/server/plugins/postgresql/resource.c file | annotate | diff | comparison | revisions
--- a/src/server/plugins/postgresql/resource.c	Sun Sep 25 10:36:28 2022 +0200
+++ b/src/server/plugins/postgresql/resource.c	Sun Sep 25 10:47:49 2022 +0200
@@ -83,7 +83,6 @@
             }
         }
         log_ereport(loglevel, "Resource pool %s: Failed to connect to database: %.*s", rpname, errlen, err);
-        PQfinish(connection);
         return 1;
     }
     return 0;

mercurial