aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2014-07-24 08:19:19 -0400
committerRobert Haas <rhaas@postgresql.org>2014-07-24 08:26:06 -0400
commitb9fecd5330b6313f3c2fb5bba584a9dfdd1524c2 (patch)
treef028c96077941d9f7a6698781a25ca3bd9ed1434
parentc7ec796a2613a304e65392a788cc6dd2c4dda8de (diff)
downloadpostgresql-b9fecd5330b6313f3c2fb5bba584a9dfdd1524c2.tar.gz
postgresql-b9fecd5330b6313f3c2fb5bba584a9dfdd1524c2.zip
Avoid access to already-released lock in LockRefindAndRelease.
Spotted by Tom Lane.
-rw-r--r--src/backend/storage/lmgr/lock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index 4327986a20c..e9bf7f4303c 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -2948,7 +2948,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);