From bbfd859521073e1e399f91b78016d621a78e60d1 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Sun, 15 Dec 2002 13:45:32 +0000 Subject: Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF --- Python/modsupport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v0.12