mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-22 22:56:29 +00:00
Prevent a double-free
This can occur because prior to this, there is a code path that looks
like this:
primaryConn = myLocalConn
CloseConnections will subsequently try to free both with PQFinish.
I'm not sure if this is the right fix -- it's more of hack -- without
more information about design intention.
One reasonable alternative would be to have CloseConnections perform
this check itself. As-is I am pretty sure that this fix leaves a
signal-race (when CloseConnections is called, without the check, in
the interrupt handler) unfixed.
Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
This commit is contained in:
committed by
Peter van Hardenberg
parent
6cea339697
commit
309bb92d95
Reference in New Issue
Block a user