diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2015-09-20 16:48:44 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2015-09-20 16:48:44 -0400 |
commit | e32c5f118ec2da80fd76da1241dd721ceb3e9127 (patch) | |
tree | d14cd3bca3baaa252c0204528e48ddb40e612b75 /src/backend/utils/adt/jsonb_util.c | |
parent | f38070d630149a98984a7145093e08706ad99828 (diff) | |
download | postgresql-e32c5f118ec2da80fd76da1241dd721ceb3e9127.tar.gz postgresql-e32c5f118ec2da80fd76da1241dd721ceb3e9127.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/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions