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

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 parent574c7c7 commite79ceaf
1 file changed
+38
-32
lines changedLines changed: 38 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
545 | 545 |
| |
546 | 546 |
| |
547 | 547 |
| |
548 |
| - | |
549 |
| - | |
550 |
| - | |
551 |
| - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
552 | 554 |
| |
553 |
| - | |
554 |
| - | |
555 |
| - | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
556 | 558 |
| |
557 |
| - | |
558 |
| - | |
559 |
| - | |
560 |
| - | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
561 | 563 |
| |
562 |
| - | |
563 |
| - | |
564 |
| - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
565 | 567 |
| |
566 |
| - | |
567 |
| - | |
568 |
| - | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
569 | 571 |
| |
570 |
| - | |
571 |
| - | |
572 |
| - | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
573 | 575 |
| |
574 |
| - | |
575 |
| - | |
576 |
| - | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
577 | 579 |
| |
578 |
| - | |
| 580 | + | |
579 | 581 |
| |
580 |
| - | |
581 |
| - | |
582 |
| - | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
583 | 592 |
| |
584 |
| - | |
585 |
| - | |
586 |
| - | |
| 593 | + | |
587 | 594 |
| |
588 |
| - | |
589 |
| - | |
| 595 | + | |
590 | 596 |
| |
591 | 597 |
| |
592 | 598 |
| |
|
0 commit comments
Comments
(0)