Avoid access to already-released lock in LockRefindAndRelease.

Spotted by Tom Lane.
This commit is contained in:
Robert Haas 2014-07-24 08:19:19 -04:00
parent 967a4e7f31
commit 32d78894c2
1 changed files with 1 additions and 1 deletions

View 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);