- Notifications
You must be signed in to change notification settings - Fork4.9k
Commiteed5bbc
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 parent44297a0 commiteed5bbc
1 file changed
+5
-2
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
644 | 644 |
| |
645 | 645 |
| |
646 | 646 |
| |
647 |
| - | |
| 647 | + | |
648 | 648 |
| |
649 | 649 |
| |
650 | 650 |
| |
| |||
994 | 994 |
| |
995 | 995 |
| |
996 | 996 |
| |
997 |
| - | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
998 | 1000 |
| |
| 1001 | + | |
999 | 1002 |
| |
1000 | 1003 |
| |
1001 | 1004 |
| |
|
0 commit comments
Comments
(0)