diff options
author | Etsuro Fujita <efujita@postgresql.org> | 2024-04-11 19:05:05 +0900 |
---|---|---|
committer | Etsuro Fujita <efujita@postgresql.org> | 2024-04-11 19:05:05 +0900 |
commit | 01b01a77fe786740ec5e657e5f2ed0a94ab0ac17 (patch) | |
tree | 11b59484c45813d8f763b59a339b9cc6bb3f07bb /src/backend/optimizer/util/clauses.c | |
parent | f5cee411a1903fdad9d60c80022fbe4ad3c4d519 (diff) |
Fix WaitEventSet resource leak in WaitLatchOrSocket().
This function would have the same issue we solved in commit 501cfd07d:
If an error is thrown after calling CreateWaitEventSet(), the file
descriptor (on epoll- or kqueue-based systems) or handles (on Windows)
that the WaitEventSet contains are leaked.
Like that commit, use PG_TRY-PG_FINALLY (PG_TRY-PG_CATCH in v12) to make
sure the WaitEventSet is freed properly.
Back-patch to all supported versions, but as we do not have this issue
in HEAD (cf. commit 50c67c201), no need to apply this patch to it.
Discussion: https://postgr.es/m/CAPmGK16MqdDoD8oatp8SQWaEa4vS3nfQqDN_Sj9YRuu5J3Lj9g%40mail.gmail.com
Diffstat (limited to 'src/backend/optimizer/util/clauses.c')
0 files changed, 0 insertions, 0 deletions