mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-04 12:41:38 +00:00
plugins/python: check return value of PyType_Ready in init_uwsgi_embedded_module
Reported by Coverity as CID #970972.
This commit is contained in:
@@ -592,7 +592,11 @@ void init_uwsgi_embedded_module() {
|
||||
PyObject *new_uwsgi_module, *zero;
|
||||
int i;
|
||||
|
||||
PyType_Ready(&uwsgi_InputType);
|
||||
if (PyType_Ready(&uwsgi_InputType) < 0) {
|
||||
PyErr_Print();
|
||||
uwsgi_log("could not initialize the uwsgi python module\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* initialize for stats */
|
||||
up.workers_tuple = PyTuple_New(uwsgi.numproc);
|
||||
|
||||
Reference in New Issue
Block a user