forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit01b01a7
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 parentf5cee41 commit01b01a7
1 file changed
+38
-32
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
402 | 404 | | |
403 | | - | |
404 | | - | |
405 | | - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
406 | 408 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
411 | 413 | | |
412 | | - | |
413 | | - | |
414 | | - | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
415 | 417 | | |
416 | | - | |
417 | | - | |
418 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
419 | 421 | | |
420 | | - | |
421 | | - | |
422 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
423 | 425 | | |
424 | | - | |
425 | | - | |
426 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
427 | 429 | | |
428 | | - | |
| 430 | + | |
429 | 431 | | |
430 | | - | |
431 | | - | |
432 | | - | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
433 | 442 | | |
434 | | - | |
435 | | - | |
436 | | - | |
| 443 | + | |
437 | 444 | | |
438 | | - | |
439 | | - | |
| 445 | + | |
440 | 446 | | |
441 | 447 | | |
442 | 448 | | |
| |||
0 commit comments
Comments
(0)