From 8da262879ef5e53620b9e6a0da82510d09c105cb Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Thu, 24 Jul 2014 08:19:19 -0400 Subject: [PATCH] Avoid access to already-released lock in LockRefindAndRelease. Spotted by Tom Lane. --- src/backend/storage/lmgr/lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c index cd468bcc99..723051efb5 100644 --- a/src/backend/storage/lmgr/lock.c +++ b/src/backend/storage/lmgr/lock.c @@ -2949,7 +2949,7 @@ LockRefindAndRelease(LockMethod lockMethodTable, PGPROC *proc, * Decrement strong lock count. This logic is needed only for 2PC. */ if (decrement_strong_lock_count - && ConflictsWithRelationFastPath(&lock->tag, lockmode)) + && ConflictsWithRelationFastPath(locktag, lockmode)) { uint32 fasthashcode = FastPathStrongLockHashPartition(hashcode);