[Python-checkins] python/dist/src/Python modsupport.c,2.62,2.63
jvr@users.sourceforge.net
jvr@users.sourceforge.net
Sun, 15 Dec 2002 05:45:35 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv11025/Python
Modified Files:
modsupport.c
Log Message:
Fixed potential crash: v can be NULL here, so use Py_XDECREF rather than Py_DECREF
Index: modsupport.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/modsupport.c,v
retrieving revision 2.62
retrieving revision 2.63
diff -C2 -d -r2.62 -r2.63
*** modsupport.c 14 Aug 2002 20:57:56 -0000 2.62
--- modsupport.c 15 Dec 2002 13:45:32 -0000 2.63
***************
*** 79,83 ****
v = PyString_FromString(doc);
if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
! Py_DECREF(v);
return NULL;
}
--- 79,83 ----
v = PyString_FromString(doc);
if (v == NULL || PyDict_SetItemString(d, "__doc__", v) != 0) {
! Py_XDECREF(v);
return NULL;
}