aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/freespace/freespace.c
diff options
context:
space:
mode:
authorEtsuro Fujita <efujita@postgresql.org>2024-04-11 19:05:02 +0900
committerEtsuro Fujita <efujita@postgresql.org>2024-04-11 19:05:02 +0900
commitb82dca2a5a929c2b65174a073194a9cfb080052f (patch)
tree64436de2bb38f1b0e5093b6e9f97f0c2a4306693 /src/backend/storage/freespace/freespace.c
parentd85db0a8e95cb7284a288d18f6fe48afde65c9f9 (diff)
downloadpostgresql-b82dca2a5a929c2b65174a073194a9cfb080052f.tar.gz
postgresql-b82dca2a5a929c2b65174a073194a9cfb080052f.zip
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/storage/freespace/freespace.c')
0 files changed, 0 insertions, 0 deletions