[Python-checkins] python/dist/src/Objects typeobject.c, 2.241.6.10,
2.241.6.11
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Jun 25 18:19:04 EDT 2004
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10348
Modified Files:
Tag: release23-maint
typeobject.c
Log Message:
Fix leak found by Eric Huss.
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.241.6.10
retrieving revision 2.241.6.11
diff -C2 -d -r2.241.6.10 -r2.241.6.11
*** typeobject.c 11 Jun 2004 15:09:41 -0000 2.241.6.10
--- typeobject.c 25 Jun 2004 22:18:46 -0000 2.241.6.11
***************
*** 3914,3918 ****
if (func == NULL)
return -1;
! return PyDict_SetItemString(type->tp_dict, "__new__", func);
}
--- 3914,3923 ----
if (func == NULL)
return -1;
! if(PyDict_SetItemString(type->tp_dict, "__new__", func)) {
! Py_DECREF(func);
! return -1;
! }
! Py_DECREF(func);
! return 0;
}
More information about the Python-checkins
mailing list