8000 bpo-40957: Fix refleak in _Py_fopen_obj() by tiran · Pull Request #20827 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content
8000

bpo-40957: Fix refleak in _Py_fopen_obj() #20827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-40957: Fix refleak in _Py_fopen_obj()
Signed-off-by: Christian Heimes <christian@python.org>
  • Loading branch information
tiran committed Jun 12, 2020
commit 74a3fe6d37cf165dd975fd8669e398fc0b37486f
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix refleak in _Py_fopen_obj() when PySys_Audit() fails
1 change: 1 addition & 0 deletions Python/fileutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,7 @@ _Py_fopen_obj(PyObject *path, const char *mode)
path_bytes = PyBytes_AS_STRING(bytes);

if (PySys_Audit("open", "Osi", path, mode, 0) < 0) {
Py_DECREF(bytes);
return NULL;
}

Expand Down
0