[Python-checkins] CVS: python/dist/src/Objects fileobject.c,2.94,2.95
A.M. Kuchling
python-dev@python.org
Tue, 19 Dec 2000 12:59:07 -0800
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv1678
Modified Files:
fileobject.c
Log Message:
Patch #102868 from cgw: fix memory leak when an EOF is encountered
using GNU libc's getline()
Index: fileobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.94
retrieving revision 2.95
diff -C2 -r2.94 -r2.95
*** fileobject.c 2000/11/30 18:27:50 2.94
--- fileobject.c 2000/12/19 20:59:04 2.95
***************
*** 661,664 ****
--- 661,667 ----
Py_END_ALLOW_THREADS
if (n1 == -1) {
+ if (buf){
+ free(buf);
+ }
clearerr(fp);
if (PyErr_CheckSignals()) {