From: Just van Rossum Date: Sun, 15 Dec 2002 13:45:32 +0000 (+0000) Subject: Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF X-Git-Tag: v2.3c1~3003 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbfd859521073e1e399f91b78016d621a78e60d1;p=thirdparty%2FPython%2Fcpython.git Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF --- diff --git a/Python/modsupport.c b/Python/modsupport.c index 98b034133018..a2a095ed3e1f 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);