From 3e5ea478d875c15e7ba47778568b2f7edb54a0f1 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Thu, 24 Oct 2024 09:16:14 -0700 Subject: 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 --- src/backend/access/heap/heapam.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/backend/access/heap/heapam.c') diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 846650c0ec0..1ebdc9d3e9f 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -6038,10 +6038,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, ¤t_is_member)) + lockmode, NULL)) { LockBuffer(buffer, BUFFER_LOCK_UNLOCK); ret = false; -- cgit v1.2.3