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

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 parent5e9d8be commit0341d4b
1 file changed
+39
-30
lines changedLines changed: 39 additions & 30 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
377 |
| - | |
378 |
| - | |
379 |
| - | |
380 |
| - | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
381 | 383 |
| |
382 |
| - | |
383 |
| - | |
384 |
| - | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
385 | 387 |
| |
386 |
| - | |
387 |
| - | |
388 |
| - | |
389 |
| - | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
390 | 392 |
| |
391 |
| - | |
392 |
| - | |
393 |
| - | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
394 | 396 |
| |
395 |
| - | |
396 |
| - | |
397 |
| - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
398 | 400 |
| |
399 |
| - | |
400 |
| - | |
401 |
| - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
402 | 404 |
| |
403 |
| - | |
404 |
| - | |
405 |
| - | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
406 | 408 |
| |
407 |
| - | |
| 409 | + | |
408 | 410 |
| |
409 |
| - | |
410 |
| - | |
411 |
| - | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
412 | 421 |
| |
413 |
| - | |
414 |
| - | |
415 |
| - | |
| 422 | + | |
| 423 | + | |
416 | 424 |
| |
| 425 | + | |
417 | 426 |
| |
418 | 427 |
| |
419 | 428 |
| |
|
0 commit comments
Comments
(0)