pgsql: Fix resource leak when a FDW's ForeignAsyncRequest function fail

2023-11-23 Thread Heikki Linnakangas
Fix resource leak when a FDW's ForeignAsyncRequest function fails If an error is thrown after calling CreateWaitEventSet(), the memory of a WaitEventSet is free'd as it's allocated in the short-lived memory context, but the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows

pgsql: Fix resource leak when a FDW's ForeignAsyncRequest function fail

2023-11-23 Thread Heikki Linnakangas
Fix resource leak when a FDW's ForeignAsyncRequest function fails If an error is thrown after calling CreateWaitEventSet(), the memory of a WaitEventSet is free'd as it's allocated in the short-lived memory context, but the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows

pgsql: Fix resource leak when a FDW's ForeignAsyncRequest function fail

2023-11-23 Thread Heikki Linnakangas
Fix resource leak when a FDW's ForeignAsyncRequest function fails If an error is thrown after calling CreateWaitEventSet(), the memory of a WaitEventSet is free'd as it's allocated in the short-lived memory context, but the file descriptor (on epoll- or kqueue-based systems) or handles (on Windows