diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 1268df9c161..ecf372a43a3 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -628,7 +628,9 @@ descr_new(PyTypeObject *descrtype, PyTypeObject *type, const char *name) Py_DECREF(descr); descr = NULL; } - descr->d_qualname = NULL; + else { + descr->d_qualname = NULL; + } } return descr; }