summaryrefslogtreecommitdiffstats
path: root/Objects/descrobject.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-12-17 13:02:20 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-12-17 13:02:20 (GMT)
commitf2fe7f0881b89c3aeba2f7fda0cb73611857cf30 (patch)
treee3ad2ebd1d1b4a2e931bffde9cccf2e0ee81094c /Objects/descrobject.c
parent2f197078fbd04c1df8c77798f7a257537de53aa6 (diff)
downloadcpython-f2fe7f0881b89c3aeba2f7fda0cb73611857cf30.zip
cpython-f2fe7f0881b89c3aeba2f7fda0cb73611857cf30.tar.gz
cpython-f2fe7f0881b89c3aeba2f7fda0cb73611857cf30.tar.bz2
fix possible NULL dereference
Diffstat (limited to 'Objects/descrobject.c')
-rw-r--r--Objects/descrobject.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/descrobject.c b/Objects/descrobject.c
index 1268df9..ecf372a 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;
}