forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitba51774
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 parent85eda7e commitba51774
1 file changed
+4
-2
lines changedLines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
753 | 753 |
| |
754 | 754 |
| |
755 | 755 |
| |
756 |
| - | |
| 756 | + | |
757 | 757 |
| |
758 | 758 |
| |
759 | 759 |
| |
| |||
1222 | 1222 |
| |
1223 | 1223 |
| |
1224 | 1224 |
| |
1225 |
| - | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
1226 | 1228 |
| |
1227 | 1229 |
| |
1228 | 1230 |
| |
|
0 commit comments
Comments
(0)