mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
bpo-35454: Fix miscellaneous minor issues in error handling. (#11077)
* bpo-35454: Fix miscellaneous minor issues in error handling. * Fix a null pointer dereference.
This commit is contained in:
parent
bb86bf4c4e
commit
8905fcc85a
9 changed files with 44 additions and 23 deletions
|
@ -129,8 +129,10 @@ PyObject *_PyCodec_Lookup(const char *encoding)
|
|||
|
||||
/* Next, scan the search functions in order of registration */
|
||||
args = PyTuple_New(1);
|
||||
if (args == NULL)
|
||||
goto onError;
|
||||
if (args == NULL) {
|
||||
Py_DECREF(v);
|
||||
return NULL;
|
||||
}
|
||||
PyTuple_SET_ITEM(args,0,v);
|
||||
|
||||
len = PyList_Size(interp->codec_search_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue