]> granicus.if.org Git - postgresql/commit
Fix off-by-one bug in LWLockRegisterTranche().
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Apr 2014 19:59:57 +0000 (15:59 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 25 Apr 2014 19:59:57 +0000 (15:59 -0400)
commit4bfc5f1396b18da3a0db73e4406badc4ce793a1e
treec0d169da9570c2703f9db56b6bbb500629e2fc0e
parent49137ec9d469f744289d0dfa2487a7fc1ef217cb
Fix off-by-one bug in LWLockRegisterTranche().

Original coding failed to enlarge the array as required if
the requested tranche_id was equal to LWLockTranchesAllocated.

In passing, fix poor style of not casting the result of (re)palloc.
src/backend/storage/lmgr/lwlock.c