Skip to content
Snippets Groups Projects
Commit 17b04a15 authored by Heikki Linnakangas's avatar Heikki Linnakangas
Browse files

Fix use of free in walsender error handling after a sysid mismatch.

Found via valgrind. The bug exists since the introduction of the walsender,
so backpatch to 9.0.

Andres Freund
parent 3a024c11
No related branches found
No related tags found
No related merge requests found
......@@ -135,6 +135,7 @@ libpqrcv_connect(char *conninfo, XLogRecPtr startpoint)
GetSystemIdentifier());
if (strcmp(primary_sysid, standby_sysid) != 0)
{
primary_sysid = pstrdup(primary_sysid);
PQclear(res);
ereport(ERROR,
(errmsg("database system identifier differs between the primary and standby"),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment