postgres.git / summary / log / commit / refs
commit 18470e5f2f3767547f596dcd2e174dc2fc7076fe
Author: Robert Haas <rhaas@postgresql.org>
Date: Thu Jul 24 12:19:19 2014 +0000
First released in: 9.5.0, 9.2.10, 9.3.6, 9.4.0
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 e62ba62a0f1..e6fc7a2b298 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -2878,7 +2878,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);
[parent: 1da2f64fd166]