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 8d62769

Browse filesBrowse files
authored
Merge pull request #13333 from QuLogic/PySequence_GetItem-leak
Fix possible leak of return of PySequence_GetItem.
2 parents 78736fa + f0c5969 commit 8d62769
Copy full SHA for 8d62769

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
@@ -725,6 +725,7 @@ static PyObject *Py_convert_to_string(PyObject *self, PyObject *args, PyObject *
725725
return NULL;
726726
}
727727
codes[i] = PyBytes_AsString(item);
728+
Py_DECREF(item);
728729
if (codes[i] == NULL) {
729730
return NULL;
730731
}

‎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.