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

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 parentd85db0a commitb82dca2
1 file changed
+38
-32
lines changedLines changed: 38 additions & 32 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
529 | 529 |
| |
530 | 530 |
| |
531 | 531 |
| |
532 |
| - | |
533 |
| - | |
534 |
| - | |
535 |
| - | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
536 | 538 |
| |
537 |
| - | |
538 |
| - | |
539 |
| - | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
540 | 542 |
| |
541 |
| - | |
542 |
| - | |
543 |
| - | |
544 |
| - | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
545 | 547 |
| |
546 |
| - | |
547 |
| - | |
548 |
| - | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
549 | 551 |
| |
550 |
| - | |
551 |
| - | |
552 |
| - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
553 | 555 |
| |
554 |
| - | |
555 |
| - | |
556 |
| - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
557 | 559 |
| |
558 |
| - | |
559 |
| - | |
560 |
| - | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
561 | 563 |
| |
562 |
| - | |
| 564 | + | |
563 | 565 |
| |
564 |
| - | |
565 |
| - | |
566 |
| - | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
567 | 576 |
| |
568 |
| - | |
569 |
| - | |
570 |
| - | |
| 577 | + | |
571 | 578 |
| |
572 |
| - | |
573 |
| - | |
| 579 | + | |
574 | 580 |
| |
575 | 581 |
| |
576 | 582 |
| |
|
0 commit comments
Comments
(0)