Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Avoid access to already-released lock in LockRefindAndRelease.
authorRobert Haas <rhaas@postgresql.org>
Thu, 24 Jul 2014 12:19:19 +0000 (08:19 -0400)
committerRobert Haas <rhaas@postgresql.org>
Thu, 24 Jul 2014 12:39:46 +0000 (08:39 -0400)
Spotted by Tom Lane.

src/backend/storage/lmgr/lock.c

index e62ba62a0f1fcd06ba1a9444cfd1aa3e49e4aa99..e6fc7a2b298d209951aeb22a067b54dd8a2425a8 100644 (file)
@@ -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);