mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-26 16:46:28 +00:00
avoid double free on repmgrd exit as master
This commit is contained in:
committed by
Greg Smith
parent
8d2aff558d
commit
657aa3013b
@@ -36,11 +36,11 @@
|
|||||||
/* Local info */
|
/* Local info */
|
||||||
t_configuration_options local_options;
|
t_configuration_options local_options;
|
||||||
int myLocalMode = STANDBY_MODE;
|
int myLocalMode = STANDBY_MODE;
|
||||||
PGconn *myLocalConn;
|
PGconn *myLocalConn = NULL;
|
||||||
|
|
||||||
/* Primary info */
|
/* Primary info */
|
||||||
t_configuration_options primary_options;
|
t_configuration_options primary_options;
|
||||||
PGconn *primaryConn;
|
PGconn *primaryConn = NULL;
|
||||||
|
|
||||||
char sqlquery[QUERY_STR_LEN];
|
char sqlquery[QUERY_STR_LEN];
|
||||||
|
|
||||||
@@ -71,7 +71,7 @@ static void setup_cancel_handler(void);
|
|||||||
CancelQuery(); \
|
CancelQuery(); \
|
||||||
if (myLocalConn != NULL) \
|
if (myLocalConn != NULL) \
|
||||||
PQfinish(myLocalConn); \
|
PQfinish(myLocalConn); \
|
||||||
if (primaryConn != NULL) \
|
if (primaryConn != NULL && primaryConn != myLocalConn) \
|
||||||
PQfinish(primaryConn);
|
PQfinish(primaryConn);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user