aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2024-10-24 09:16:14 -0700
committerNoah Misch <noah@leadboat.com>2024-10-24 09:16:18 -0700
commitd34ffbaa102910490f427752fa4b28e786225e80 (patch)
treeea26d693b4ef9bf57a49ae11e2ddf46abc9ee983 /src/backend/access
parentaf4e342034d6dd17cf843612e37facabc70d3c34 (diff)
downloadpostgresql-d34ffbaa102910490f427752fa4b28e786225e80.tar.gz
postgresql-d34ffbaa102910490f427752fa4b28e786225e80.zip
Stop reading uninitialized memory in heap_inplace_lock().
Stop computing a never-used value. This removes the read; the read had no functional implications. Back-patch to v12, like commit a07e03fd8fa7daf4d1356f7cb501ffe784ea6257. Reported by Alexander Lakhin. Discussion: https://postgr.es/m/6c92f59b-f5bc-e58c-9bdd-d1f21c17c786@gmail.com
Diffstat (limited to 'src/backend/access')
-rw-r--r--src/backend/access/heap/heapam.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c
index febb38db15b..33d69641269 100644
--- a/src/backend/access/heap/heapam.c
+++ b/src/backend/access/heap/heapam.c
@@ -6229,10 +6229,9 @@ heap_inplace_lock(Relation relation,
LockTupleMode lockmode = LockTupleNoKeyExclusive;
MultiXactStatus mxact_status = MultiXactStatusNoKeyUpdate;
int remain;
- bool current_is_member;
if (DoesMultiXactIdConflict((MultiXactId) xwait, infomask,
- lockmode, &current_is_member))
+ lockmode, NULL))
{
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
ret = false;