From f2fe7f0881b89c3aeba2f7fda0cb73611857cf30 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sat, 17 Dec 2011 08:02:20 -0500 Subject: [PATCH] fix possible NULL dereference --- Objects/descrobject.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }