Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ec0f1fa

Browse filesBrowse files
NelleVMeeseeksDev[bot]
authored andcommitted
Backport PR #13333: Fix possible leak of return of PySequence_GetItem.
1 parent 5fa2e77 commit ec0f1fa
Copy full SHA for ec0f1fa

File tree

Expand file treeCollapse file tree

2 files changed

+2
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-0
lines changed

‎src/_path_wrapper.cpp

Copy file name to clipboardExpand all lines: src/_path_wrapper.cpp
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,7 @@ static PyObject *Py_convert_to_string(PyObject *self, PyObject *args, PyObject *
727727
return NULL;
728728
}
729729
codes[i] = PyBytes_AsString(item);
730+
Py_DECREF(item);
730731
if (codes[i] == NULL) {
731732
return NULL;
732733
}

‎src/py_adaptors.h

Copy file name to clipboardExpand all lines: src/py_adaptors.h
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,7 @@ class PathGenerator
240240
throw py::exception();
241241
}
242242
if (!convert_path(item, &path)) {
243+
Py_DECREF(item);
243244
throw py::exception();
244245
}
245246
Py_DECREF(item);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.