pgsql: Fix off-by-one bug in LWLockRegisterTranche().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix off-by-one bug in LWLockRegisterTranche().
Date: 2014-04-25 20:00:02
Message-ID: E1WdmHy-0004PC-Gc@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4bfc5f1396b18da3a0db73e4406badc4ce793a1e

Modified Files
--------------
src/backend/storage/lmgr/lwlock.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2014-04-26 16:22:16 pgsql: Record the proper typmod for an index expression column.
Previous Message Tom Lane 2014-04-25 19:40:45 pgsql: Clean up temp installations after client program tests.