Commit ea212066 authored by Miss Islington (bot)'s avatar Miss Islington (bot) Committed by GitHub

closes bpo-34477: Objects/typeobject.c: Add missing NULL check to type_init() (GH-8876)


Reported by Svace static analyzer.
(cherry picked from commit f6247aac)
Co-authored-by: default avatarAlexey Izbyshev <izbyshev@ispras.ru>
parent 5c437d6f
......@@ -2082,6 +2082,9 @@ type_init(PyObject *cls, PyObject *args, PyObject *kwds)
/* Call object.__init__(self) now. */
/* XXX Could call super(type, cls).__init__() but what's the point? */
args = PyTuple_GetSlice(args, 0, 0);
if (args == NULL) {
return -1;
}
res = object_init(cls, args, NULL);
Py_DECREF(args);
return res;
......
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