summaryrefslogtreecommitdiffstats
path: root/Python/modsupport.c
diff options
context:
space:
mode:
authorJust van Rossum <just@letterror.com>2002-12-15 13:45:32 (GMT)
committerJust van Rossum <just@letterror.com>2002-12-15 13:45:32 (GMT)
commitbbfd859521073e1e399f91b78016d621a78e60d1 (patch)
treeffc6bd7a7f22293006f9dd9921dc4e04ea0d5a5e /Python/modsupport.c
parentedd179ee7789d2938c973880027a54be7d817e6d (diff)
downloadcpython-bbfd859521073e1e399f91b78016d621a78e60d1.zip
cpython-bbfd859521073e1e399f91b78016d621a78e60d1.tar.gz
cpython-bbfd859521073e1e399f91b78016d621a78e60d1.tar.bz2
Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF
Diffstat (limited to 'Python/modsupport.c')
-rw-r--r--Python/modsupport.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c
index 98b0341..a2a095e 100644
--- a/Python/modsupport.c
+++ b/Python/modsupport.c
@@ -78,7 +78,7 @@ Py_InitModule4(char *name, PyMethodDef *methods, char *doc,
if (doc != NULL) {
v = PyString_FromString(doc);
if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
- Py_DECREF(v);
+ Py_XDECREF(v);
return NULL;
}
Py_DECREF(v);