Kaydet (Commit) 9edcc2e2 authored tarafından Neal Norwitz's avatar Neal Norwitz

Handle error

üst 7378df78
...@@ -167,7 +167,10 @@ PyObject *_PyCodec_Lookup(const char *encoding) ...@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment