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 9508b74

Browse filesBrowse files
gh-117953: Fix Refleaks Introduced by gh-118194 (gh-118250)
A couple of refleaks slipped through in gh-118194. This takes care of them. (AKA _Py_ext_module_loader_info_init() does not steal references.)
1 parent 6f7a862 commit 9508b74
Copy full SHA for 9508b74

File tree

Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-1
lines changed

‎Python/importdl.c

Copy file name to clipboardExpand all lines: Python/importdl.c
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,13 @@ _Py_ext_module_loader_info_init_from_spec(
195195
}
196196
PyObject *filename = PyObject_GetAttrString(spec, "origin");
197197
if (filename == NULL) {
198+
Py_DECREF(name);
198199
return -1;
199200
}
200-
return _Py_ext_module_loader_info_init(p_info, name, filename);
201+
int err = _Py_ext_module_loader_info_init(p_info, name, filename);
202+
Py_DECREF(name);
203+
Py_DECREF(filename);
204+
return err;
201205
}
202206

203207

0 commit comments

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