Memory error in src/backend/replication/logical/origin.c - Mailing list pgsql-hackers

From Mark Dilger
Subject Memory error in src/backend/replication/logical/origin.c
Date
Msg-id 01EF74C5-F124-49F1-8B1E-53A7CD9ED2B7@gmail.com
Whole thread Raw
Responses Re: Memory error in src/backend/replication/logical/origin.c  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hackers,
       bool        nulls[Natts_pg_replication_origin];
...           memset(&nulls, 0, sizeof(nulls));

around lines 277 through 303.  Patch below.

mark



diff --git a/src/backend/replication/logical/origin.c b/src/backend/replication/logical/origin.c
index 55382b4b24..88188bd190 100644
--- a/src/backend/replication/logical/origin.c
+++ b/src/backend/replication/logical/origin.c
@@ -300,7 +300,7 @@ replorigin_create(char *roname)                        * Ok, found an unused roident, insert the
newrow and do a CCI,                        * so our callers can look it up if they want to.                        */ 
-                       memset(&nulls, 0, sizeof(nulls));
+                       memset(nulls, 0, sizeof(nulls));
values[Anum_pg_replication_origin_roident- 1] = ObjectIdGetDatum(roident);
values[Anum_pg_replication_origin_roname- 1] = roname_d; 



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: has_sequence_privilege() never got the memo
Next
From: Tom Lane
Date:
Subject: Re: Memory error in src/backend/replication/logical/origin.c