mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Handle error
This commit is contained in:
parent
7378df7822
commit
9edcc2e2fd
1 changed files with 4 additions and 1 deletions
|
|
@ -167,7 +167,10 @@ PyObject *_PyCodec_Lookup(const char *encoding)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Cache and return the result */
|
/* Cache and return the result */
|
||||||
PyDict_SetItem(interp->codec_search_cache, v, result);
|
if (PyDict_SetItem(interp->codec_search_cache, v, result) < 0) {
|
||||||
|
Py_DECREF(result);
|
||||||
|
goto onError;
|
||||||
|
}
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue