forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb714bc4

Etsuro Fujita
Fix WaitEventSet resource leak in WaitLatchOrSocket().
This function would have the same issue we solved in commit501cfd0:If an error is thrown after calling CreateWaitEventSet(), the filedescriptor (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 makesure the WaitEventSet is freed properly.Back-patch to all supported versions, but as we do not have this issuein HEAD (cf. commit50c67c2), no need to apply this patch to it.Discussion:https://postgr.es/m/CAPmGK16MqdDoD8oatp8SQWaEa4vS3nfQqDN_Sj9YRuu5J3Lj9g%40mail.gmail.com1 parentdc5824a commitb714bc4
1 file changed
+38
-32
lines changedLines changed: 38 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
526 | 526 |
| |
527 | 527 |
| |
528 | 528 |
| |
529 |
| - | |
530 |
| - | |
531 |
| - | |
532 |
| - | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
533 | 535 |
| |
534 |
| - | |
535 |
| - | |
536 |
| - | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
537 | 539 |
| |
538 |
| - | |
539 |
| - | |
540 |
| - | |
541 |
| - | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
542 | 544 |
| |
543 |
| - | |
544 |
| - | |
545 |
| - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
546 | 548 |
| |
547 |
| - | |
548 |
| - | |
549 |
| - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
550 | 552 |
| |
551 |
| - | |
552 |
| - | |
553 |
| - | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
554 | 556 |
| |
555 |
| - | |
556 |
| - | |
557 |
| - | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
558 | 560 |
| |
559 |
| - | |
| 561 | + | |
560 | 562 |
| |
561 |
| - | |
562 |
| - | |
563 |
| - | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
564 | 573 |
| |
565 |
| - | |
566 |
| - | |
567 |
| - | |
| 574 | + | |
568 | 575 |
| |
569 |
| - | |
570 |
| - | |
| 576 | + | |
571 | 577 |
| |
572 | 578 |
| |
573 | 579 |
| |
|
0 commit comments
Comments
(0)