From b553a70ad50e8647af60e1dd7e672d47296d28b6 Mon Sep 17 00:00:00 2001 From: Ian Barwick Date: Wed, 25 Apr 2018 14:08:17 +0900 Subject: [PATCH] repmgrd: always close the connection if the pointer is not NULL --- dbutils.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/dbutils.c b/dbutils.c index 42214480..072595fb 100644 --- a/dbutils.c +++ b/dbutils.c @@ -317,10 +317,7 @@ close_connection(PGconn **conn) if (*conn == NULL) return; - if (PQstatus(*conn) == CONNECTION_OK) - { - PQfinish(*conn); - } + PQfinish(*conn); *conn = NULL; }