Skip to content

Commit 18470e5

Browse files
committed
Avoid access to already-released lock in LockRefindAndRelease.
Spotted by Tom Lane.
1 parent 1da2f64 commit 18470e5

File tree

1 file changed

+1
-1
lines changed
  • src/backend/storage/lmgr

1 file changed

+1
-1
lines changed

src/backend/storage/lmgr/lock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,7 @@ LockRefindAndRelease(LockMethod lockMethodTable, PGPROC *proc,
28782878
* Decrement strong lock count. This logic is needed only for 2PC.
28792879
*/
28802880
if (decrement_strong_lock_count
2881-
&& ConflictsWithRelationFastPath(&lock->tag, lockmode))
2881+
&& ConflictsWithRelationFastPath(locktag, lockmode))
28822882
{
28832883
uint32 fasthashcode = FastPathStrongLockHashPartition(hashcode);
28842884

0 commit comments

Comments
 (0)