aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2015-09-20 16:48:44 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2015-09-20 16:48:44 -0400
commit3d3bc2905f2ed6a4858501031c086383be7bcf6a (patch)
tree2bd96f5bcfb4d164dffe5f5963277dd1390d9953 /src/backend/utils/adt/numeric.c
parentb46f5ebd9c8f6ec37e27c56749266fc2e362902b (diff)
downloadpostgresql-3d3bc2905f2ed6a4858501031c086383be7bcf6a.tar.gz
postgresql-3d3bc2905f2ed6a4858501031c086383be7bcf6a.zip
Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock().
RemoveLocalLock() must consider the possibility that LockAcquireExtended() failed to palloc the initial space for a locallock's lockOwners array. I had evidently meant to cope with this hazard when the code was originally written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that the pfree needed to be protected with an if-test. Just to make sure things are left in a clean state, reset numLockOwners as well. Per low-memory testing by Andreas Seltenreich. Back-patch to all supported branches.
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions