]> granicus.if.org Git - postgresql/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:19:19 +0000 (08:19 -0400)
Spotted by Tom Lane.

src/backend/storage/lmgr/lock.c

index cd468bcc99c0eb4185bccdd877ff333c9dde32fe..723051efb50d7f764b10f4e0a4a9406e3de00bc2 100644 (file)
@@ -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);