forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite32c5f1
committed
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 originallywritten (commit1785ace), but missed thatthe pfree needed to be protected with an if-test. Just to make sure thingsare left in a clean state, reset numLockOwners as well.Per low-memory testing by Andreas Seltenreich. Back-patch to all supportedbranches.1 parentf38070d commite32c5f1
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
758 | 758 |
| |
759 | 759 |
| |
760 | 760 |
| |
761 |
| - | |
| 761 | + | |
762 | 762 |
| |
763 | 763 |
| |
764 | 764 |
| |
| |||
1227 | 1227 |
| |
1228 | 1228 |
| |
1229 | 1229 |
| |
1230 |
| - | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1231 | 1233 |
| |
1232 | 1234 |
| |
1233 | 1235 |
| |
|
0 commit comments
Comments
(0)