Content-Length: 256055 | pFad | http://github.com/postgrespro/postgres/commit/3a8e9e977fa642433986e5cd145e3a6f86601c2c

1A Fix use of free in walsender error handling after a sysid mismatch. · postgrespro/postgres@3a8e9e9 · GitHub
Skip to content

Commit 3a8e9e9

Browse files
committed
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
1 parent 8d6a07f commit 3a8e9e9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/replication/libpqwalreceiver/libpqwalreceiver.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ libpqrcv_identify_system(TimeLineID *primary_tli)
152152
GetSystemIdentifier());
153153
if (strcmp(primary_sysid, standby_sysid) != 0)
154154
{
155+
primary_sysid = pstrdup(primary_sysid);
155156
PQclear(res);
156157
ereport(ERROR,
157158
(errmsg("database system identifier differs between the primary and standby"),

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/3a8e9e977fa642433986e5cd145e3a6f86601c2c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy