[Python-checkins] python/dist/src/Objects complexobject.c, 2.67,
2.68
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Thu Aug 14 19:16:39 EDT 2003
Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv12181/Objects
Modified Files:
complexobject.c
Log Message:
complex_new(): This could leak when the argument was neither string nor
number. This accounts for the 2 refcount leaks per test_complex run
Michael Hudson discovered (I figured only I would have the stomach to
look for leaks in floating-point code <wink>).
Index: complexobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/complexobject.c,v
retrieving revision 2.67
retrieving revision 2.68
diff -C2 -d -r2.67 -r2.68
*** complexobject.c 17 Jun 2003 20:22:24 -0000 2.67
--- complexobject.c 15 Aug 2003 01:16:37 -0000 2.68
***************
*** 883,886 ****
--- 883,889 ----
PyErr_SetString(PyExc_TypeError,
"complex() argument must be a string or a number");
+ if (own_r) {
+ Py_DECREF(r);
+ }
return NULL;
}
More information about the Python-checkins
mailing list