Title: gh-146245: Fix ref/buffer leaks in socketmodule.c on audit hook failure by kimimgo · Pull Request #146247 · python/cpython · GitHub
Open Graph Title: gh-146245: Fix ref/buffer leaks in socketmodule.c on audit hook failure by kimimgo · Pull Request #146247 · python/cpython
X Title: gh-146245: Fix ref/buffer leaks in socketmodule.c on audit hook failure by kimimgo · Pull Request #146247 · python/cpython
Description: Fixes #146245 Summary Two leak bugs in socketmodule.c when PySys_Audit raises: 1. getaddrinfo (line 6985) return NULL skipped cleanup of idna and pstr refs. Changed to goto err which properly calls Py_XDECREF on both. 2. sock_sendto (line 4811) return NULL skipped PyBuffer_Release(&pbuf). Added the release before the return, matching the pattern used in adjacent error paths. Issue: gh-146245
Open Graph Description: Fixes #146245 Summary Two leak bugs in socketmodule.c when PySys_Audit raises: 1. getaddrinfo (line 6985) return NULL skipped cleanup of idna and pstr refs. Changed to goto err which properly calls...
X Description: Fixes #146245 Summary Two leak bugs in socketmodule.c when PySys_Audit raises: 1. getaddrinfo (line 6985) return NULL skipped cleanup of idna and pstr refs. Changed to goto err which properly calls...
Opengraph URL: https://github.com/python/cpython/pull/146247
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:6e87a771-9dcf-2d95-293c-dc9a2e8ae4d8 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D764:1B3289:1209B80:18968EA:6A521339 |
| html-safe-nonce | 99086200d6e98e7024a7fba388b90c35d165a0685f9e89de464eb0d4884704bf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzY0OjFCMzI4OToxMjA5QjgwOjE4OTY4RUE6NkE1MjEzMzkiLCJ2aXNpdG9yX2lkIjoiMjM2NDI3MTgwMTkyNjgxNjU3MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 2f46ef887d5ac91d57eb61bb034c3a690be0b0e4a441e1040b752f98c565c8b1 |
| hovercard-subject-tag | pull_request:3428161541 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/146247/files |
| twitter:image | https://avatars.githubusercontent.com/u/21175731?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/21175731?s=400&v=4 |
| og:image:alt | Fixes #146245 Summary Two leak bugs in socketmodule.c when PySys_Audit raises: 1. getaddrinfo (line 6985) return NULL skipped cleanup of idna and pstr refs. Changed to goto err which properly calls... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width