[Python-checkins] python/dist/src/Objects frameobject.c,2.76,2.77

arigo at projects.sourceforge.net arigo at projects.sourceforge.net
Tue Jan 27 11:08:17 EST 2004


Update of /cvsroot/python/python/dist/src/Objects
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14485

Modified Files:
	frameobject.c 
Log Message:
Two forgotten Py_DECREF() for two out-of-memory conditions.

Index: frameobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/frameobject.c,v
retrieving revision 2.76
retrieving revision 2.77
diff -C2 -d -r2.76 -r2.77
*** frameobject.c	21 Oct 2003 18:14:20 -0000	2.76
--- frameobject.c	27 Jan 2004 16:08:07 -0000	2.77
***************
*** 585,590 ****
  	if (free_list == NULL) {
  		f = PyObject_GC_NewVar(PyFrameObject, &PyFrame_Type, extras);
! 		if (f == NULL)
  			return NULL;
  	}
  	else {
--- 585,592 ----
  	if (free_list == NULL) {
  		f = PyObject_GC_NewVar(PyFrameObject, &PyFrame_Type, extras);
! 		if (f == NULL) {
! 			Py_DECREF(builtins);
  			return NULL;
+ 		}
  	}
  	else {
***************
*** 595,600 ****
  		if (f->ob_size < extras) {
  			f = PyObject_GC_Resize(PyFrameObject, f, extras);
! 			if (f == NULL)
  				return NULL;
  		}
  		_Py_NewReference((PyObject *)f);
--- 597,604 ----
  		if (f->ob_size < extras) {
  			f = PyObject_GC_Resize(PyFrameObject, f, extras);
! 			if (f == NULL) {
! 				Py_DECREF(builtins);
  				return NULL;
+ 			}
  		}
  		_Py_NewReference((PyObject *)f);




More information about the Python-checkins mailing list