# HG changeset patch
# User Olaf Wintermann <olaf.wintermann@gmail.com>
# Date 1664095669 -7200
# Node ID c6c5638e97b8170bad022fc7ad1127e90f455a48
# Parent  30d29ef5b79ab36923450d596daeabca937eb8ec
fix double free in postgresql resourcepool if pg_check_connection fails

diff -r 30d29ef5b79a -r c6c5638e97b8 src/server/plugins/postgresql/resource.c
--- 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;