mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
bpo-29802: Fix reference counting in module-level struct functions (#1213)
when pass arguments of wrong type.
This commit is contained in:
parent
8f5cdfa9fc
commit
40db90c1ce
4 changed files with 15 additions and 0 deletions
|
@ -3907,6 +3907,7 @@ PyUnicode_FSDecoder(PyObject* arg, void* addr)
|
|||
PyObject *output = NULL;
|
||||
if (arg == NULL) {
|
||||
Py_DECREF(*(PyObject**)addr);
|
||||
*(PyObject**)addr = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue