[Python-checkins] python/dist/src/Objects fileobject.c,2.182,2.183

loewis at users.sourceforge.net loewis at users.sourceforge.net
Sun Sep 7 14:42:31 EDT 2003


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1:/tmp/cvs-serv17569/Objects

Modified Files:
	fileobject.c 
Log Message:
Only release buffer after file has been closed. Fixes #800824.
Will backport to 2.2.


Index: fileobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/fileobject.c,v
retrieving revision 2.182
retrieving revision 2.183
diff -C2 -d -r2.182 -r2.183
*** fileobject.c	7 Sep 2003 03:30:18 -0000	2.182
--- fileobject.c	7 Sep 2003 20:42:29 -0000	2.183
***************
*** 389,393 ****
  {
  	int sts = 0;
- 	PyMem_Free(f->f_setbuf);
  	if (f->f_fp != NULL) {
  		if (f->f_close != NULL) {
--- 389,392 ----
***************
*** 399,402 ****
--- 398,402 ----
  		f->f_fp = NULL;
  	}
+ 	PyMem_Free(f->f_setbuf);
  	if (sts == EOF)
  		return PyErr_SetFromErrno(PyExc_IOError);





More information about the Python-checkins mailing list