]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
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:26:06 +0000 (08:26 -0400)
Spotted by Tom Lane.

src/backend/storage/lmgr/lock.c

index 4327986a20c3b012bc1b6bef26a9fd4d64ebad7a..e9bf7f4303c2253e3a1356f2c04bfeaa46bdda12 100644 (file)
@@ -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);